Progression With Points

Discussion in 'BBAssets' started by Tars Tarkas, Jun 18, 2019.

Tags:
  1. Tars Tarkas

    Tars Tarkas Avid Boxer

    Joined:
    Jul 17, 2018
    Messages:
    303
    Likes Received:
    228
    Somebody asked me how I did the level progression in a game of mine.
    I added a zip of a bbdoc here.
    I have not used code, I used the send and receive nodes.
    It works on my game, but it may not work for all the projects.
    Maybe someone will find it useful.
     

    Attached Files:

    viking, itzonator and PunkPuffin like this.
  2. itzonator

    itzonator Serious Boxer

    Joined:
    Dec 18, 2017
    Messages:
    594
    Likes Received:
    228
    Hey man, thanks for sharing. What version of BB 3 you have used for this one? Official Release?
     
  3. Tars Tarkas

    Tars Tarkas Avid Boxer

    Joined:
    Jul 17, 2018
    Messages:
    303
    Likes Received:
    228
    Yes, the official release.
     
  4. itzonator

    itzonator Serious Boxer

    Joined:
    Dec 18, 2017
    Messages:
    594
    Likes Received:
    228
    @Tars Tarkas your solution is very clever, but I do not have a finish object at the end of the scene to complete a level with coins. I added event observer on game UI to track level completion. So the Level Selector Node has a NEXT option, tried to plug that one out to if Collide with Coin (selected) instead of finish object you had. Did not work. My "Next" level option is Event Observer in UI, I cannot link that into the Node.
     
  5. itzonator

    itzonator Serious Boxer

    Joined:
    Dec 18, 2017
    Messages:
    594
    Likes Received:
    228
    Well, it looks like the Level Selector node is not being used on progression.bbdoc.

    Here's my simplified version of it, see attachment to this post.

    Change log:
    - Removed level selector node
    - Removed Defeat nodes in Progression asset
    - Added progression in UI, instead of the 3D world.
     

    Attached Files:

    Tars Tarkas likes this.
  6. Tars Tarkas

    Tars Tarkas Avid Boxer

    Joined:
    Jul 17, 2018
    Messages:
    303
    Likes Received:
    228
    I added it in the world because if i added in UI I don't have a stick to edge option, it might not show depending on your screen adjustment setting
     
    itzonator likes this.
  7. itzonator

    itzonator Serious Boxer

    Joined:
    Dec 18, 2017
    Messages:
    594
    Likes Received:
    228
    @Tars Tarkas
    On Progression asset, I have:
    - Receive, Event Name 1
    - Receive, Event Name 2
    - Receive, Event Name 3

    Code for each Receive Node:

    Code:
    ///
    
    var eventName;
    var eventCallback = function(val){
        this.emitSignal('Out', val);
    };
    
    function init() {
        eventName = this.attribute('Event Name');
        eventCallback = eventCallback.bind(this);
    }
    function start(){
        Event.addListener('eventName::' + eventName, eventCallback);
    }
    function onRemove(){
        Event.removeListener('eventName::' + eventName, eventCallback);
    }
    function update(dt) {}
    function signal(name, value) {}
    
    

    On Point asset, I have:
    - Send, Event Name 1
    - Send, Event Name 2
    - Send, Event Name 3

    Code for each Send Node:
    Code:
    ///
    var eventName;
    function init(){
        eventName = this.attribute('Event Name');
    }
    
    function start(){}
    
    function update(dt){}
    
    function signal(name, value){
        Event.fire('eventName::' + eventName, value);
    }
    
    
    Can you now reproduce this progression bar?
    It seems like I cannot figure out a way to SEND multiple signals separately and execute each separately when the point collides with character. I need to link SEND with Event Name 2 and SEND with Event Name 3 as well. Please check the bbdoc attached here.
     

    Attached Files:

  8. Tars Tarkas

    Tars Tarkas Avid Boxer

    Joined:
    Jul 17, 2018
    Messages:
    303
    Likes Received:
    228
    Yes it's easy. Check the file I attached. Go to the point object and click the send node. You will see next to the Event name a pin icon that is pressed. This way you can change the name for that event inside the world. I changed them to 1, 2 and 3.

    That featured is very useful, you can find on every node, for example if you want an object to rotate, you press that and you can duplicate that object in the scene and have it rotate at different speeds. I did not notice it at first either.

    Also that defeat node made sense in the first file I added. If you don't want to remove the point after you collide with it, the defeat node it's necessary.
     

    Attached Files:

Share This Page