How An I Add Level Name To My Sections ?

Discussion in 'How Can I...?' started by HarikaYesim, Jan 20, 2020.

  1. HarikaYesim

    HarikaYesim Boxer

    Joined:
    Jan 14, 2020
    Messages:
    16
    Likes Received:
    0
    I have only one world and in every section (level) , in the beginning of section I would like to be seen like Level 1 Level 2 .... How can I add that? Do I need to make it from Game UI ?
     
  2. Hanomax

    Hanomax Avid Boxer

    Joined:
    Aug 24, 2018
    Messages:
    157
    Likes Received:
    85
    To show "Level X", you can do it by making new asset.
    Connecting label node with start node. Name it as StartLabel.
    Delay node (value 0.1), connect with start node.
    And Script node, connect with delay node.
    If you write into script node:
    Code:
    var _startLabel;
    var _enabled = false;
    
    function init(){
    
    }
    
    function update(dt){
    }
    
    function signal(name, value){
    if(value){
    _enabled = true;
    
    _startLabel = this.entity().component('StartLabel');
    _startLabel.setText(String('Level '+(Settings.levelID)));
    }
    }
    
    Make this asset in game world UI, and in timeline editor, you can animate it so it is disappears after few seconds.
    And when level is finished, you need completed UI.
     
  3. HarikaYesim

    HarikaYesim Boxer

    Joined:
    Jan 14, 2020
    Messages:
    16
    Likes Received:
    0
    I did connect them in my Character's start node if I get right what you said .

    At the top of my character it pops up indeed however the Level 1, 2 etc. seems written reverse. Besides that after a while it doesn't vanish.
     
  4. Hanomax

    Hanomax Avid Boxer

    Joined:
    Aug 24, 2018
    Messages:
    157
    Likes Received:
    85
    Don't make these nodes into charater's asset. Go to world UI, import empty object, delete animation, and make all these there. The drag it into your UI screen.
    You can make it disappear, using timeline animation editor, or in that asset node map, connect delay and remove node with start node.
     
    HarikaYesim likes this.
  5. HarikaYesim

    HarikaYesim Boxer

    Joined:
    Jan 14, 2020
    Messages:
    16
    Likes Received:
    0
    Thanks a lot for this, it works now.
     

Share This Page