How to have Endless Actor's falling Down
harperaujla
Member Posts: 2
I don't know if this is the correct category to be posting this but 'yolo' as one would say.
Anyways, I require some minor assistance to whom may understand the solution to this simple problem
I need an endless amount of objects falling from the top of the screen to the bottom of the screen, if it hits the player the game restarts and your score is updated. I just need to know how to have an Endless amount of objects falling down from the top of the screen to the bottom.
Would appreciate any help! Thanks in advance!
Comments
@harperaujla Make a boolean called start.
When your game starts...
Set game.start to 1.
Make a spawner to Spawn Actor.
Tell the Actor to move downward.
Make a Collide rule.
Make a score rule.
Make a game restart rule.
You may have to tell your spawner to only spawn Actors when game.start=1.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
@Summation I'll try that out. Seems like it'll work. Thanks!
You can also have the falling actor have an accelerate/move down attribute for moving down. You also have a controller that spawns the falling actors, maybe in a loop? Then, when actor overlaps/collides with player, destroy player, update score, and reset screen.
Here is a link to a quick project I made what has this if you I didn't explain well enough:https://drive.google.com/folderview?id=0B_AurTNLfE7gfktEeUtVdlkwNUMzWWU0U2MzNjZFM1h5V29BSVh3aVctSTliU0tQdlNiMDg&usp=sharing
Hey @harperaujla,
I made a quick project for you that recycles the actors in the scene. I also made notes what you need to do when adding new falling objects into the scene. I prefer recycling actors than constantly spawning them in and destroying them. My way is a little more work but the ending result is better in my opinion. Hope it helps!