Stop Spawners and actors?
Games4life
Member, PRO Posts: 279
Is there a way to stop the spawner from spawning and the actors to stop moving when one of the actors collide with another actor? Also is there a way so that once an animation is completed that it changes the scene? Any help is appreciated!
(G4L)
Comments
@Games4life, the answer is yes to all of your questions, but as there are countless ways that you could have implemented your game logic, there are similarly countless possible answers to your question.
Generally speaking, if you need to implement things like stopping and starting movement and spawning, it is good practice to work with game states.
Make a game level attribute GameState and define different values for different states, e.g.:
1 = setup
2 = running
3 = paused
4 = game over
You can now wrap your code section in rules which trigger according to the GameState.
At the beginning of the game, start with GameState=1
Then have rules like so to control individual behaviors
This gives you a lot of control over your code.
.
Change scene at end of animation
If you use the animate behavior, then you will probably have a sequence of images inside it, lets assume they are called ANIM001, ANIM002, ..., ANIM009.
Don't have "Loop" or "Restore actor image" on.
You can now have a rule:
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com