Help with score and resetting the scene. I have the game file to review.
My email is gamesaladhelp@gmail.com message me for the game file.
I have created a simple game that you have to touch and release three boxes before a line reaches them. If the line reaches the boxes before all three are touched it will reset the scene.
I have three rules in the game.
Rule# 1 When the "Line" or Actor 2 collides with the ”boxes” or Actor 2 it resets the scene.
Rule# 2 ( when actor receives event : touch is released : change attribute game.Score To: game.Score+1 )
This rule is to count the amount of times each box has been touched. The problem with this rule is it doesn't recognize each box individually, if the player touches the first box 3 times they will be able to move to the next scene without having to touch the rest of the boxes. This problem leads into my first question.
Question# 1 How do you make it required that each actor ”box” is touched once before the total ”Score” is achieved to move on to the next scene?
Rule #3 ( Attribute game.Score = 3 : Timer after .5 seconds : Change Scene : Go to Scene 1)
This rule is to change the scene, once the game.Score is equal to 3 then in half a second it changes to the next scene. For the sake of the game there has to be a time delay in the changing of the scene. Here is the problem, lets say that a person only touches one box before the line reaches. The scene will reset but it will still count the box that was touched before the scene reset. This leads to question number two.
Question# 2 How do you reset the amount of touches once the scene is reset? Also if someone goes back to that scene in the future it will keep a log of that persons touches and will change the scene.
Thank You in advance for the assistance.
Comments
You can toggle the reset when it collides with the line or however you like.
Need Help? Email Me | Templates | Full Game Source Code
For Question 1, i recommend adding a Touched attribute to each box, and mark the behavior that moves the score up 1 to require the touched to be false and to set the touched to be true. that way, each box only gets one hit.
The second is, mark an object in the scene with Change attribute : score to 0. This will fire at the start of the scene.
Two Threads? http://forums.gamesalad.com/discussion/68420/help-with-score-and-resetting-the-scene-i-have-the-game-file-to-review#latest
Need Help? Email Me | Templates | Full Game Source Code
[Merged] Please don't create multiple threads for the same issue.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thank You for the help!!!