Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Chelnok

Pages: [1]
help / DAME and custom properties..
« on: Fri, Feb 10, 2012 »
No luck from sticky topic: DAME - a new map editor made using flixel!

I suppose this is not too advanced question, so.. copyPaste from original post:

I have a door sprite with property jammed (boolean). I can get the value exported correctly, but i cant get my custom properties to work like i understand from helppage:

How should i use this in exporter:

Code: [Select]
%%if prop:NAME%% This should be exported if there is property NAME %%endprop%%

I have tried all combinations, but it always exports everything including all those %%things%%

If you have any experience with DAME or LUA, please drop a comment. DAMEs exporters is not so easy to understand, so any info is quite wellcome for me ..and probably to many others.

help / Line of sight
« on: Sun, Nov 13, 2011 »
I've been cheking los between two groups, five members each. No performance hit. But now i need to go bigger groups with more members. How would you do it?

help / FlxGroup, members and nullMembers
« on: Thu, Nov 3, 2011 »
I need to use FlxGroup like normal array, like myFlxGroup[2]. As far as i know, its not good to use myFlxGroup.members[2], cos there might be some null members. So i made this kind of thing:

Code: [Select]
import org.flixel.FlxGroup;

public class FlxGroupExt extends FlxGroup
public var trueMembers:Array;
private var i:uint;

public function FlxGroupExt(MaxSize:uint=0)


public function getTrueMembers():Array
trueMembers = new Array()

if(members != null)
i = 0;
while(i < members.length)
if ( members[i] != null)

return trueMembers;


For some reason i have a doubt. After few test, everything seems to work fine, but still.. i dunno :)

releases / FlxTilemapExt - tile to FlxSprite
« on: Fri, Oct 28, 2011 »
Small extension that let you grab particular tile from tilemap to FlxSprite.

How to use:

Code: [Select]
var myTileSprite:FlxSprite = map.tileToFlxSprite(15,16)
myTileSprite.velocity.x = 15 //for testing

Code: [Select]
import flash.geom.Point;
import flash.geom.Rectangle;

import org.flixel.FlxSprite;
import org.flixel.FlxTilemap;

* This is an extension that adds one function to FlxTilemap class: tileToFlxSprite().
* You can also copy the function and paste it to FlxTilemap. No need to change anything.

* @author Chelnok
public class FlxTilemapExt extends FlxTilemap
public function FlxTilemapExt()

* Chance a particular tile to FlxSprite. Or just copy the graphic if you dont want any chances to mapdata itself.
* @param X The X coordinate of the tile (in tiles, not pixels).
* @param Y The Y coordinate of the tile (in tiles, not pixels).
* @param NewTile New tile to the mapdata. Use -1 if you dont want any changes. Default = 0 (empty)
* @return FlxSprite.
public function tileToFlxSprite(X:uint,Y:uint,NewTile:int=0):FlxSprite
var rowIndex:int = X + (Y * widthInTiles);
var rect:Rectangle = _rects[rowIndex] as Rectangle;
var pt:Point = new Point(0, 0);
var tileSprite:FlxSprite = new FlxSprite();


tileSprite.x = X * _tileWidth;
tileSprite.y = Y * _tileHeight;

if (rect != null)
tileSprite.pixels.copyPixels(_tiles, rect, pt);

tileSprite.dirty = true

if (NewTile >= 0)

return tileSprite;

help / default camera
« on: Sun, Jul 31, 2011 »
I was just wondering am i doing this right:

Code: [Select]
cam = new FlxCamera(0,19, FlxG.width, 400);
//all other code..
FlxG.cameras.pop(); // pop the default camera away

When i changed cam x and height i found this default camera, so i poped it out :)

Just curious ..i usually need only one camera, and still i always have this line: cam = new FlxCamera(0,0,FlxG.width,FlxG.height) in override create(). Does Flixel do the rendering for both cams?

help / 404, broken links with earlier forums posts
« on: Tue, Jul 26, 2011 »
There is lot of broken links in messages posted before new forumEngine.
If any admin have some time to run mysql query to fix this, it would be nice.

Tip to show the post behind broken url:

Take those numbers from the end of broken url (nothing but the numbers) and goto url:,
..and add those numbers after comma

Old, broken links looks like this:
Correct link would be like this:,884.0

help / FlxPath, drawing the line?
« on: Mon, Jul 18, 2011 »
Have anyone done anykind of drawline ..things based on FlxPath data?

I mean.. simply drawing the lines to screen :) Yes, i know its probably pretty simple, but i just havnt use to work with bitmapdata and that kind of things, so any code examples are wellcome.

help / Spritesheet and performance
« on: Sun, Jul 17, 2011 »
I have quite many images in spritesheet, and i was wondering with graf.designer if there was better way to handle those sheets and animations.

It would be great to separate images to multiple sheets.

Question is; is there big hit to performance with these kind of tricks:

1. in avatar class (extends FlxSprite)
switch (avatarAction)
 "walkAndShootLeft" -> loadGraphic(walkAndShootLeft)
 "walkAndShootTopLeft" -> loadGraphic(walkAndShootTopLeft)

2. in avatar class (extends FlxGroup)
avatar class (FlxSprite)

avatarWalkAndShootLeft (FlxSprite)
avatarWalkAndShootTopLeft (FlxSprite)
switch (avatarAction)
 "walkAndShootLeft" -> walkAndShootLeft visible (hide others)

Or is there better way to do this?

help / followPath and callback
« on: Fri, Jul 8, 2011 »
I couldnt find any callback for followPath. I need to calc new path after one is walked..

Should i try to add callback option, or is there any other (good) way to do this?

games / No Candyday!
« on: Fri, Jun 24, 2011 »
First Flixel based game:

AS3 (mostly) learned from tutorials:

Flixel (+ lot more) learned from tutorials:

And finally: (not sure.. you might need to login..?)

FGL seems to have fan-accounts, so here is the link to login for ppl who doesnt have an account @fgl:

user: nocandyday
pass: nocandyday

Pages: [1]