Event Observer To Congratulation Player During A Scene

Discussion in 'How Can I...?' started by Colin MH, Feb 26, 2019.

  1. Colin MH

    Colin MH Boxer

    Joined:
    Nov 15, 2018
    Messages:
    26
    Likes Received:
    17
    Hi, this is my first post here. I am still quite new to BB.

    My first source for anything technical is in this forum which is very helpful.

    I have a technical issue which I hope someone can help me with.

    I am working on a platform game where the player has to collect coins. At the end of the level, I use a menu jump to a separate UI to sort out if the player gets a star or just a normal level complete. I have attached a sample of my configuration. This seems to work well.

    My issue is that I am trying to flash a message to congratulate the user during the scene itself if they hit the minimum number of coins, rather than wait till the level ends. At the beginning of each world, I used the Reset Coin toggle. However, I noticed that with my method, when the player dies after receiving the minimum coins and restarts the checkpoint, the congrats message still turns up even though the coins have reverted to the last checkpoint. The event observers are set to Session Coins. Hope someone can help me on this. Its really got me stumped.

    https://drive.google.com/open?id=1KQYTcjv2prExXuEzHnnFMgMHQOszkVJb
     
  2. Codifie

    Codifie Avid Boxer

    Joined:
    Apr 17, 2018
    Messages:
    364
    Likes Received:
    190
  3. Colin MH

    Colin MH Boxer

    Joined:
    Nov 15, 2018
    Messages:
    26
    Likes Received:
    17
    Hi, thanks for trying. I gave it a go and it still doesn't work. What is odd is that the sample file is behaving correctly.

    On my actual project, I set a minimum of 50 coins for the player to collect. During the level, once 50 is collected, the congrats message comes up. But say the character dies after collecting 55 coins and the checkpoint restarts to say when only 25 coins were collected, the congrats message still turns up. Needless to say, if the player reaches the end of the level with only 30 coins, he would have seen the congrats message incorrectly.
     
  4. Colin MH

    Colin MH Boxer

    Joined:
    Nov 15, 2018
    Messages:
    26
    Likes Received:
    17
  5. Codifie

    Codifie Avid Boxer

    Joined:
    Apr 17, 2018
    Messages:
    364
    Likes Received:
    190
    Strange, I am unable to duplicate that scenario. Maybe I am just not following you. I am playing with your test file, I get 2 coins, get congrats message, die before I complete level, restart, starts back up, get 2 coins get congrats finish level or die and repeat.

    EDIT:
    I see it now what you are talking about. Let me take a look at something.
     
    Last edited: Feb 26, 2019
  6. Codifie

    Codifie Avid Boxer

    Joined:
    Apr 17, 2018
    Messages:
    364
    Likes Received:
    190
    Yep, using Restart did clear the issue. Solves your issue on your end as well?
     
  7. Colin MH

    Colin MH Boxer

    Joined:
    Nov 15, 2018
    Messages:
    26
    Likes Received:
    17
    Using restart clears the issue. But having the game restart from the beginning defeats the purpose of having checkpoints. I suspect its because the Game over UI hands back control to the Congrats UI upon restart checkpoint instead of the level UI. Which is why the congrats message shows up even when the minimum coins haven't been collected upon restart checkpoint.

    Will have to think of another way.
     

Share This Page