my game is going from home to game and then score to game but not restarting
macman123
Member Posts: 98
Hello gamesalad i'm kinda new but i got the concept. on my game when i change scene from menu to game it works, and when i lose the game it goes to the score page and when i press retry it goes home, and when i press play it goes back to score. but i even set it up where when i press retry it changes scene back to game but nothin happens. please help.
Answers
i think its because i have the rule when attribute man hit is yes change attribute game over to game over yes and it wont restore after one time of gameplay.
any help
Try changing man hit to false right before you change the scene to false
When man hit is true
Change attribute man hit to false
Change scene to false
Need Help? Email Me | Templates | Full Game Source Code
how do you change scene to false?
Sorry I typed the wrong word. Before you change the scene to the score scene apply the rule I typed above.
Need Help? Email Me | Templates | Full Game Source Code
thanks it changes scene fine but when i retry it doesnt retry. which is strange it only gives one chance and doesnt retry.
when i press retry after the game it goes back to home and when i press play it goes back to score.
When you change scenes or reset scenes, game attributes do not automatically reset their values. You have to do this manually. So first you'll have to figure out which attributes need resetting and then you'll use a Change Attribute behavior to reset each one when the game starts (or ends, up to you).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
thanks ill try it and see if it works
can you tell me how the rule would go?
Not really, since I don't know your game but the general idea is this:
If [condition that indicates game is over] then change attribute game.______ to [original value]
You'd list one or more change attribute behaviors there in order to change each value. As an example, you might change game.score to 0, game.lives to 3, game.level to 1, game.ended to false, etc.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang i applied the rule you said to my game and nothin is working
Sorry to hear that. Coding is tricky work since there are so many variables involved. Since you haven't provided any details about how your game works and you haven't posted any screenshots of your work, I can't offer any more guesses about how to solve it.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
i will explain how it works and post shots in a moment if i can but i will explain how it works. its like flappy bird and when the guy dies i have the rule when greek_hit is yes change attribute game.over no to game.over yes. and it doesnt restart once he dies.
So, what you're saying is, when greek is "hit" by an object, you change attribute "greek_hit to "true".
Then, when greek_hit is "true", "Reset Scene".
Why wouldn't this work?
@jodymitoma i would change it to when greek_hit is true change to score scene. but i will try reset scene. but i was making it change to score scene so you can see your score and then press retry, but it wont retry.
What are the attributes set on your "retry" button?
Instead of all of this craziness, why not make the "Score" scene come up as a "Pause Game" attribute, then when user clicks on "Retry" button, "Unpause Game" & "Reset Scene". Baddaboom, done!
@JodyMitoma i will check the attributes and tell you give me one minute.
@JodyMitoma i dont have any attributes in the retry button all i have is when touch is pressed change scene to game.
Also if that doesn't work either, make a "Game Attribute" named "DisplayingScore" boolean "false" default.
Then when the pause (Score) scene shows up, give the "Retry" button a Rule of "Change Attribute" to "DisplayingScore" to "true".
And go from there... (Sorry, my brain just shut down, lol)
lol ok i will try that
@JodyMitoma um it has a check box on the boolean attribute and i cant type false, so should i just check the box. im kinda new sorry for giving you a headache.
@JodyMitoma it displays score fine i just need it to restart its like the game has one life and that needs to restart
Like I said above, instead of all of this craziness, why not make the "Score" scene come up by using a "Pause Game" Attribute, then when user clicks on "Retry" button, "Unpause Game", then "Reset Scene" if you have to.
@JodyMitoma ok. im in junior high so some if this is kinda hard. but sorry if im taking up your time
so does anyone have any insight
heeeeeeeeeeeeeeeeeeeeelllllllllllllllllllllllpppppppppppppppp meeeeeeeeeeeeeeeeeeeeeeeeeeeeeee! i really wanna publish this game and this one problem is gettin in the way.
This isn't the best way to get help. Did you try changing your attributes to false? Do you want to pm me your project so I can take a look?
Need Help? Email Me | Templates | Full Game Source Code
@bjandthekatz uhh what is pm?