Timing -> pop up

paulofuertespaulofuertes Member Posts: 24
edited November -1 in Working with GS (Mac)
I have a game, which has a countdown from 5 seconds, and when reaches 0 it stops.

I am trying to do, that when it reaches 0, it changes scene to a "you lost" menu. I did this with the PAUSE BUTTON, but it is basically not working the "you lost"

I tried spawning an actor (and stopping the timer), and changing scene, but still cant make it, any ideas?

I need to do one of these, the easier one ofc:

- When countdown reaches 0, change scene/spawn actor of a "you lost menu", (stopping, ofcourse, movements and time) and that when you click reset, it resets the scene/time I was on.

OR

- When countdown reaches 0, change scene/spawn actor of the "you lost menu" and making it stay for 3 secs, then resetting the timer and scene (I tried with the for 3 seconds, spawn actor youlostmenu and reset scene), but not working at all..

thanks

Comments

  • paulofuertespaulofuertes Member Posts: 24
    oh yeah, I have this by the way:

    Attribute: GameTimer = 1

    Actor 1:
    [Display Text]
    game.GameTimer

    Actor 2:
    [Rule 1]
    Attribute game.GameTimer < 0
    Timer: Every 1 seconds Change Attribute game.GameTimer to game.GameTimer-1

    [Rule 2]
    Attribute game.GameTimer = 0,
    Timer: For 3 seconds, spawn actor "youlostmenu" (front of layer)
    Timer: After 3 seconds, reset this scene AND Change Attribute game.GameTimer to game.GameTimer+5

    So, atm, the game starts, countdown too, when reaches 0, spawns the youlost menu for 3 seconds, and then resets scenes.. the only problem I am having is that is not pausing the actors on it, and I CANT use the pause game behavior :/,

    thanks again
  • paulofuertespaulofuertes Member Posts: 24
    oh my.. well, sorry but, I think I fixed it,what I did is

    on the actor, I did,

    When attribute game.GameTimer = 0,
    Timer: every 0 seconds, change attribute (movement.right left down up) to 0, making the actor not to move.

    Would this cause lag to the game? Its the only way I have atm to fix that

    and #lock /sorry
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Test it on the device to make sure it doesn't lag. It shouldn't, though. What you are doing isn't all that taxing on the system.
Sign In or Register to comment.