Reset scene
praj
Member Posts: 68
i want to make a game such that when it hits the obstacle, it will change scene to you lost. and then can try again. However, when i set a rule that says- if ball collides with wall, destroy actor and change scene to reset game, nothing happens. only ball is destroyed. Did i do something wrong?
Answers
Programming of any kind requires an understanding of logic. In this case, your actor's logic is as follows:
1. Did I collide with a wall?
.....Yes: a. Destroy me
............b. Change to a different scene
Actors can only run their rules/behaviors when they are in a scene. If you never place an actor on a scene OR if you destroy an actor and remove it from a scene, its rules will not run. So, in 1a above, you destroy your actor. The behavior in 1b will never run. If you want it to work, you have to switch the order of 1a and 1b so that the destroy behavior is at the end.
If you've tried that and it isn't working, then post a screenshot of your rules and we can help you get it working right.
Finally, expecting an answer within 30 minutes is unrealistic. Sometimes, you'll luck out and someone will answer right away, but getting an answer within 24 hours is a much more realistic expectation.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User