Switch Levels Upon A Certain Score Being Reached. Restart At Beginning.

Discussion in 'How Can I...?' started by Mr Goodcat, Feb 7, 2018.

  1. Mr Goodcat

    Mr Goodcat Boxer

    Joined:
    Jun 10, 2017
    Messages:
    98
    Likes Received:
    28
    I have a few of questions here and would appreciate any help.
    Basically i need each level to end after a certain score is reached. Then upon character death i need the game to end and the restart button to return the player back to the beginning scene. The character will not move in this game.

    I have achieved this with multiple worlds and event observers but cannot get the game restart button to revert back to the beginning level (World).
    My first question is how would i achieve this?

    I then thought that perhaps i should be looking at 1 world with multiple scenes.
    My second question is would this be better for game performance?

    And Finally how would i do this if the character does not move?

    Thanks in advance, there may well be an obvious answer here which i've completely overlooked.
     
  2. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,542
    Likes Received:
    824
    Could you not use Event Observers and different UIs for each World? Then use a default button to take you back to that World?

    Or look into Check Points?

    It really depends on your game.
    Do you have a video?
     
    Mr Goodcat likes this.
  3. Mr Goodcat

    Mr Goodcat Boxer

    Joined:
    Jun 10, 2017
    Messages:
    98
    Likes Received:
    28
    Hi Aaro, thanks for your help. Ive currently got a setup with different worlds. I have an event observer on the first world which switches the player to the second world once they have 2 points.

    However upon death of the character on the second world, the game then starts back at the second world without even passing to the Game Over UI.

    I think it may be an issue with the event observer as the game wont technically end.

    Update: The game will now end, that was a simple navigation error. However i think because the first event observer is set to 2 points, the game will only restart at the second world.
     
    Last edited: Feb 7, 2018
  4. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,542
    Likes Received:
    824
    The "Restart" button will only ever take you to the last known World, i.e. the World the UI is attached too.
    If you want a Restart button to "Restart" on a different world, just use a "Default" button and drag the node yourself or use a Back Jump button and select the World from the Drop Down Menu. :D
     
    Mr Goodcat likes this.
  5. Mr Goodcat

    Mr Goodcat Boxer

    Joined:
    Jun 10, 2017
    Messages:
    98
    Likes Received:
    28
    Ah i see. Thanks i've changed that. However the game still reverts back to the second scene which makes me believe its got to be the event observer somehow.
     
  6. Mr Goodcat

    Mr Goodcat Boxer

    Joined:
    Jun 10, 2017
    Messages:
    98
    Likes Received:
    28
    It Appears ticking this box in each world sorts the world selection problem!
     

    Attached Files:

  7. Hoodle

    Hoodle Boxer

    Joined:
    Oct 27, 2016
    Messages:
    22
    Likes Received:
    6
    You could also use an unlock button that can specify exactly where to go in whatever world and whichever scene.
     
    Mr Goodcat likes this.

Share This Page