How Can I Start Event When I Receive Amount Of Score?

Discussion in 'BBNodes' started by Nicholas0217, Mar 11, 2020.

  1. Nicholas0217

    Nicholas0217 Boxer

    Joined:
    Mar 8, 2020
    Messages:
    1
    Likes Received:
    0
    How can I start an event when I receive an amount of score? Like spawn a boss or start a new Level.

    Please Help...A lot of thanks...
     
  2. Hanomax

    Hanomax Avid Boxer

    Joined:
    Aug 24, 2018
    Messages:
    157
    Likes Received:
    85
    Add a script node and replace signal function with this one:
    Code:
    function signal(name, value){
        if(value && this.scene().currentPoints() >= 5){
            this.emitSignal('Out', true);
            }
    
    }
    Replace 5 with desired amount of points to trigger action.

    Edd input and output. Name output as "Out".
    Add delay node (value of 0.1) and connect it with same if collide node, which is connected with Add Point node. And connect delay output with script node.
    And with script's output you can choose, what you want to do. Connect it with event node, to jump another UI, which takes you to new level, or connect with Send node and use Receive node to spawn a boss.
     
    Kotaro Izumida and Nicholas0217 like this.

Share This Page