How can I spawn a sprite based on a condition after the game starts?

Posted by teddyweedy on Game Development See other posts from Game Development or by teddyweedy
Published on 2013-09-18T13:36:25Z Indexed on 2014/08/25 4:33 UTC
Read the original article Hit count: 208

Filed under:
|
|

How do I spawn a sprite anytime later in the game when the game starts?

I'm using FlashDevelop with Flixel. I did try it in override public function create(): void. It works only in the beginning. I try it using if (FlxG.score == 1) but it doesn't work. I also tried it in override public function update(): void. It works and it is moving but it leaves a sprite making it a multi-sprite. I also did try FlxGroup but to no avail.

© Game Development or respective owner

Related posts about sprites

Related posts about actionscript-3