Unlock New World When X Distance Reached (issue)

Discussion in 'How Can I...?' started by cegdkye, Feb 26, 2017.

  1. cegdkye

    cegdkye Boxer

    Joined:
    Feb 1, 2016
    Messages:
    29
    Likes Received:
    10
    Hey guys!

    Almost finished my game, but now I am struggling with one thing. I have two worlds (lets call them W1 and W2). All scenes are random. W2 is locked at the beginning (Nav button, main menu). To unlock it, you have to reach X distance in W1.

    In W1, theres an Event observer, waiting for Total Score X. When you reach X, W1 pauses and shows a UI with some "unlock successful" text and a Nav button to W2. Everything works just fine, but whenever you enter W1 (from main menu) it Shows the "unlock successful" UI at the very beginning...

    How can I tell Event Observer (or whatever) to "keep eye on the X distance only ONCE"?

    My head is gonna blow up. Please help.

    I've seen two threads with similar issues, but I couldn't get anything useful from them.
     
  2. playsgames6666

    playsgames6666 Miniboss Boxer

    Joined:
    Nov 13, 2015
    Messages:
    1,168
    Likes Received:
    745
    You need to have a different world UI.
    Im guessing your both worlds are using the same UI, so duplicate the UI and remove the event observer from the second world UI.
     
    rohitaneja8 likes this.
  3. cegdkye

    cegdkye Boxer

    Joined:
    Feb 1, 2016
    Messages:
    29
    Likes Received:
    10
    Thanks for your input, but that's not the case... I have a different UI for the W2 without an Event Observer. The problem is when you want to play in W1 (after unlocking W2), the Event Observer is still active.
     
  4. playsgames6666

    playsgames6666 Miniboss Boxer

    Joined:
    Nov 13, 2015
    Messages:
    1,168
    Likes Received:
    745
    sorry, just re read your post, set event observer to current distance, session distance.
    Ive done this before, ill find the file and see what i did LOL,
     
  5. playsgames6666

    playsgames6666 Miniboss Boxer

    Joined:
    Nov 13, 2015
    Messages:
    1,168
    Likes Received:
    745
    @cegdkye yea set it to session distance. should be good.
     
  6. cegdkye

    cegdkye Boxer

    Joined:
    Feb 1, 2016
    Messages:
    29
    Likes Received:
    10
    :) I think I didn't make it clear enough.
    I've tried Session Distance as well. It still counts every time when you play W1. And I want it to be just once. Once the player reaches X - it unlocks W2 and "turns off", so when you play W1 again you won't be interrupted at X.
     
  7. playsgames6666

    playsgames6666 Miniboss Boxer

    Joined:
    Nov 13, 2015
    Messages:
    1,168
    Likes Received:
    745
    No i understand, its just hard to tell what you have going on, without seeing it.
    But ill try and help the best i can.
    So what i did.----
    World 1 UI, 2 event observer's, 1 set to game over, the other 1 set to session distance, then duplicate that UI again, remove the session distance event observer , and put in your unlock for your world 2.
    Image attached, for example of world map.
    If you don't get ill upload a file to dropbox
     

    Attached Files:

    cegdkye likes this.
  8. playsgames6666

    playsgames6666 Miniboss Boxer

    Joined:
    Nov 13, 2015
    Messages:
    1,168
    Likes Received:
    745
    @cegdkye
    I think your problem might be you have your event observer directing straight to world 2.
     
  9. cegdkye

    cegdkye Boxer

    Joined:
    Feb 1, 2016
    Messages:
    29
    Likes Received:
    10
    Wow, that's closer! My event observer sends to a UI with text "unlocked blah blah" and a Nav button which takes you to W2...

    Where did you put the Unlock button for W2? I think its missing in your screenshot...
     
  10. playsgames6666

    playsgames6666 Miniboss Boxer

    Joined:
    Nov 13, 2015
    Messages:
    1,168
    Likes Received:
    745
    I put it in the duplicate world 1 UI,
    So if you die before reaching your desired distance then it will go to game over UI.
    But if you reach the distance you want to reach it will then go to the duplicate world 1. which triggers the unlock for world 2. which you can have your UI for congratulations world 2 unlocked
     
    cegdkye likes this.
  11. cegdkye

    cegdkye Boxer

    Joined:
    Feb 1, 2016
    Messages:
    29
    Likes Received:
    10
    IT WORKS!!! Maaaaan thank you so so so so much!!!!! :)
     
    playsgames6666 likes this.
  12. playsgames6666

    playsgames6666 Miniboss Boxer

    Joined:
    Nov 13, 2015
    Messages:
    1,168
    Likes Received:
    745
    awesome......
     
    cegdkye likes this.
  13. Jaro

    Jaro Avid Boxer

    Joined:
    Sep 21, 2018
    Messages:
    387
    Likes Received:
    127
    Hi, its fantastic idea. Thank you guys ! Where I could connect congrats screen with button to open next level ?
     

Share This Page