Progress Bar With Different Distances For Each Level

Discussion in 'BBAssets' started by Codifie, Jun 11, 2020.

  1. Codifie

    Codifie Avid Boxer

    Joined:
    Apr 17, 2018
    Messages:
    364
    Likes Received:
    190
    I realize there is already a basset for this, but this one is a bit easier for people to understand, edit and use.
    This asset uses very simple basic code.
    Code:
       case 1:
            _distance = 3200;
            if(_distance == 0){
                _distance = 1;
                }
            break;
         
        case 2:
            _distance = 300;
            if(_distance == 0){
                _distance = 1;
                }
            break;
            
    So case 1: is level 1 and _distance = 3200 is the distance level 1 is using.
    So for each level you copy this code
    Code:
       case 1:
            _distance = 3200;
            if(_distance == 0){
                _distance = 1;
                }
            break;
    change the level number, in this case 1 to what ever level you are assigning, so if level 12, change it to case 12:
    change _distance to the distance setting you wish to use.
    Do this for each and every level.

    This code allows you to use 1 world with scenes having different distances, currently the Progression asset makes you use the same distance for each scene when using it in a 1 world environment.

    I should also mention that this code resides in the Script node of the asset.

    Thats it.

    https://www.dropbox.com/s/04bevje6w8qf625/progressionw:level_distance.bbasset?dl=0
     
    Last edited: Jun 11, 2020
  2. Dyllin Aleluia

    Dyllin Aleluia Boxer

    Joined:
    May 31, 2020
    Messages:
    3
    Likes Received:
    1

Share This Page