PowerUps from the Top?
Here's what I want to do...
I want PowerUps to drop down from the top of my game (the game is one scene and the camera doesn't move...it's a casual game).
I need to recycle the actors so that they can be used again and again throughout gameplay...
Here's what I have...
Invisible actor that generates a random number between 1 and 11 (there are 11 total power-ups).
All 11 Power-Up actors are above the scene (out of sight).
Example PowerUp Actor: PowerUpActor1
RULE: When PowerUpNumber = 1
Accelerate 270 Degrees (down) at a speed of 200.
RULE: When PowerUpActor1 collides/overlaps with Player
*DO POWER UP ACTIVITY*
Change attribute PowerUpNumber to 0,
Change attributes self.position.X and self.position.Y *to above scene*
1. How can I get the powerup to not continue falling?
2. Is this the best way to do this?
3. Can I use interpolate instead and make the actor NON-MOVABLE? Would I have to make it's alpha 0 when it collides with the player?
I want PowerUps to drop down from the top of my game (the game is one scene and the camera doesn't move...it's a casual game).
I need to recycle the actors so that they can be used again and again throughout gameplay...
Here's what I have...
Invisible actor that generates a random number between 1 and 11 (there are 11 total power-ups).
All 11 Power-Up actors are above the scene (out of sight).
Example PowerUp Actor: PowerUpActor1
RULE: When PowerUpNumber = 1
Accelerate 270 Degrees (down) at a speed of 200.
RULE: When PowerUpActor1 collides/overlaps with Player
*DO POWER UP ACTIVITY*
Change attribute PowerUpNumber to 0,
Change attributes self.position.X and self.position.Y *to above scene*
1. How can I get the powerup to not continue falling?
2. Is this the best way to do this?
3. Can I use interpolate instead and make the actor NON-MOVABLE? Would I have to make it's alpha 0 when it collides with the player?
Comments
sooooo.. when to spawn and when to recycle??
But say your trying to do a unlimited game with powerups, youd have to have like 50 powerup offscreen and thats not good. Youll take more of a performance hit having alll those actors offscreen, then spawning and destroying a power up now and then
edit: tshirt beat me
If you do it before you change the number to 0, it will accelerate again.