Very weird problem with pause and reset game

Hello, I'm making a "game" with a number of smaller minigames in it. Each minigame can be chosen from a menu that starts when the game is initiated, and each minigame has it's own scene. In each minigame-scene I have a button that can pause the game, and a button that resets the whole game and returns to the menu-scene (to exit each minigame).

I have 4 games now, and each game has the same logic that control these behaviors. In the first game it is not working. Nor pause or reset seem to work when clicking the buttons.

In the second game they both work flawlessly.

In the third game, they both don't work again.

In the fourth game, everything works flawlessly.

I'm trying to understand why it isn't working for the first and third minigame, because I use the same logic. Logic that works for the other two scenes.

Is there anyone here who understands this?

Comments

  • BellowBellow Bartender Member, PRO Posts: 227

    If you show us all codes i will help you. Can you use any attribute for resets maybe problem stay on that.

  • sting2winsting2win Member Posts: 4

    Okay here is the pausebutton (called startbutton ingame for aesthetic reasons):
    http://stingsart.com/stuff/gs/1_startbutton.jpg

    Here is the reset button. It changes an attribute that controls whether or not a game reset will be triggered:
    http://stingsart.com/stuff/gs/2_infobutton.jpg

    Here is the code that triggers the game reset:
    http://stingsart.com/stuff/gs/3_infobutton.jpg

  • BellowBellow Bartender Member, PRO Posts: 227

    Everything looks normal. I dont understand why you are reseting all game. If you try pause and unpause it will be more easier. Or use reset scene.

    Your all codes looks perfectly fine there look no problem but maybe you can change your attribute to boolen from integer.

    Use as a if boolen true reset if false not.

  • vafurlogivafurlogi Member Posts: 203

    You seem to be working in an instance of the button actor and not the prototype. Do all the scenes have an instance of that actor with the same logic? Also you're using a game level attribute to reset your game. Does that attribute reset at the beginning of your game?

Sign In or Register to comment.