by DST » Fri Jun 20, 2008 3:18 pm
One thing i'd like you to notice: the blocks that the player can destroy...do not use DestroyActor.
Instead, they use visibility state.
This is important, because what happens when the player dies and restarts the level? In this case, you can just send a timer to the blocks reenabling them.
And with enemies, you want to do a similiar thing. Have 'creator' actors that spawn the enemy, once, on a platform, on the beginning of a level. You can also use a timer to send to all the creators and have them recreate enemies when the level is restarted. Likewise, before that happens, you want to destroy any current enemies that exist.
Enemies , bullets, and fx are temporary actors. You can destroy them. Everything else is permanent. Do not destroy.
Fuzzy was the one who explained this to me; and it's probably the biggest shortcoming in most of the demos i've seen; Restarting levels and Restarting the game...you gotta plan for that.