GameOver

0 favourites
  • 7 posts
  • HI

    Almost there ... for the Competition :-)

    Ive made a Layout = GameOver

    and here I have the score and a play again btn

    this goes to my layout1

    BUT HOW DO I ...

    Reset the game ( can I be don a global way )

    Regards

    flemmig

  • It all depends on how you coded everything.

    When you go back to a layout, the code is executed again from the "On start of layout event".

    Nevertheless, if you used global variables and/or global objects, those are still in memory, and then you have to "reset" them from the gameover layout, when you click on restart.

    For example, a global HiScore variable needs to be set to 0 (or else the game will start again with the current score).

    Same goes for global objects, you need to set them to their original start position/content/instance variables values, etc...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks !

    Esaxt and done :-)

  • How about how to reset local variables like EX: a local time variable?

    I need to know dfor my game. after boss beat or dead etc.. need time to stop and reset if player chooses to rety level.

  • Erndog2k: There's an error in your term I think.

    Local variables are reseted each tick.

    Once again, it depends how you made your game.

    But pretty much, set your timer to 0 when you take your player back to a ride in the level.

  • scirra.com/forum/topic49686_post312743.html

    Thanks for speedy reply :)

    above is a link to a forum I opened better explaining I think what i'm trying to do. as well as the tut I used to do it.

    srry in advanced for spelling keys are dying.

  • Small stupid question that might add a bit of light.

    I destroyed the Player object when the user is killed. Then I created a new object in an event, but it seems that the Player object is duplicated.

    Tips?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)