my game is going from home to game and then score to game but not restarting

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.

«1

Answers

  • macman123macman123 Member Posts: 98

    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.

  • macman123macman123 Member Posts: 98

    any help

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    edited April 2014

    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

  • macman123macman123 Member Posts: 98

    how do you change scene to false?

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375

    Sorry I typed the wrong word. Before you change the scene to the score scene apply the rule I typed above.

  • macman123macman123 Member Posts: 98

    thanks it changes scene fine but when i retry it doesnt retry. which is strange it only gives one chance and doesnt retry.

  • macman123macman123 Member Posts: 98

    when i press retry after the game it goes back to home and when i press play it goes back to score.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    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

  • macman123macman123 Member Posts: 98

    thanks ill try it and see if it works

  • macman123macman123 Member Posts: 98

    can you tell me how the rule would go?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @kenyanguy20 said:
    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

  • macman123macman123 Member Posts: 98

    @tatiang i applied the rule you said to my game and nothin is working

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    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

  • macman123macman123 Member Posts: 98

    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.

  • JodyMitomaJodyMitoma Member Posts: 307

    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?

  • macman123macman123 Member Posts: 98

    @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.

  • JodyMitomaJodyMitoma Member Posts: 307

    What are the attributes set on your "retry" button?

  • JodyMitomaJodyMitoma Member Posts: 307
    edited April 2014

    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!

  • macman123macman123 Member Posts: 98

    @JodyMitoma‌ i will check the attributes and tell you give me one minute.

  • macman123macman123 Member Posts: 98

    @JodyMitoma‌ i dont have any attributes in the retry button all i have is when touch is pressed change scene to game.

  • JodyMitomaJodyMitoma Member Posts: 307

    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)

  • macman123macman123 Member Posts: 98

    lol ok i will try that

  • macman123macman123 Member Posts: 98

    @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.

  • macman123macman123 Member Posts: 98

    @JodyMitoma‌ it displays score fine i just need it to restart its like the game has one life and that needs to restart

  • JodyMitomaJodyMitoma Member Posts: 307

    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.

  • macman123macman123 Member Posts: 98

    @JodyMitoma‌ ok. im in junior high so some if this is kinda hard. but sorry if im taking up your time

  • macman123macman123 Member Posts: 98

    so does anyone have any insight

  • macman123macman123 Member Posts: 98

    heeeeeeeeeeeeeeeeeeeeelllllllllllllllllllllllpppppppppppppppp meeeeeeeeeeeeeeeeeeeeeeeeeeeeeee! i really wanna publish this game and this one problem is gettin in the way.

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375

    @macman123 said:
    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?

  • macman123macman123 Member Posts: 98
    edited April 2014

    @‌bjandthekatz uhh what is pm?

Sign In or Register to comment.