when all actors out of scene then game over?
kdim74
Member Posts: 2
Hi everybody!
Let's say that we have a scene with three actors which are not controlled by us and one actor that it is. The actor that it is controlled by us, can push the other three actors .So, i want to change the scene (to game over scene) when all the other three actors are simultaneously out of the scene.Does anybody knows how could i do that?
Answers
you could have a rule. create a game over boolean(true or false) and then an attribute
If game.over is true
change attribute (name of enemies/self) position to X (off the scene).
remember when you start the game fresh, you need to change if game.over is false - reset your actors to their correct position again
Like Balls? Then click here! We've 100 coming soon
Thank you so much for your answer!i ll try that tonight!
I tried but it didn't work.Let me tell you what i ve done!
I made a scene boolean attribute "game over" .Then i made for every actor a rule which says when any of those happen change attribute "game over" to true.
for every actor is:
when any conditions are valid
attribute-selfposition x>900
attribute-selfposition x<0 attribute-selfposition y>600
attribute-selfposition y<0
change attribute "gameover" to true
then i made a rule to the scene which says:
when "game over" is true
then change scene to gameover scene.
The size of the camera is 900x600
What i really want to achieve is this.When all the actors are out of the size of camera simultaneously then game over.in the scene the wrap x and wrap y is on which means that when an actor get out off the scene it comes back from the other side.So what i want is when the player manage to push all the actors out of the camera simultaneously then gameover!
If you have any suggestion it would be awesome!
Thanks in advance!