I have a scene that will appear multiple times. Is there a way to show/hide assets when the scene starts? So the first time it gets to the scene assets A, B and C are visible and D, E and F are not. The second time it shows A, B and C are invisible and D, E and F are visible. I'd rather avoid copying the scene and having ABC in one and DEF in the other (it's impractical based on the objects, how much I think I'm going to have to tweak this to get right.)
yeah, using these lines Code: if(Settings.levelID == "scene name"){} and inside assets use this Code: this.entity.setVisiblity(false or true) you can use trigger = 0 when specific scene appears then trigger++ and inside assets when trigger == 3 or any number then ....this.entity.setVisiblity(false or true)
I understand the code and concept of what you've said. I just have no idea where code goes in Buildbox yet. Is there some main game loop somewhere? Anyway, an example would be great and will help with other things where I need some additional logic. Thanks.
here is edited on character and triangle https://drive.google.com/file/d/1F-RRed4H3RoZdfyl_BjnbADjtVblVcEE/view?usp=sharing
I can't open the bbdoc, it says it's been created with a newer version of BB, but I'm running the latest version 3.2.2 Are there more than 5 scenes in it, maybe it's because I'm on the free version, although can still do more than 5 scenes at the moment. Still need to prove a few more things before I can commit to a paid version...
mmm, no, not the number of scenes, I'm not using the official version, it's closed to demo version, anyway, I will send the script here, give me 1 sec
inside the object you want to hide add script node and add these lines Code: let names; function init(){ } function start(){ names = this.scene().currentLevelName(); if(names == 'Name of the scene'){ Settings.variable++; if(Settings.variable == Number){ this.entity().remove(); Settings.variable = 0; } } } change "Name of the scene" to scene name Number to times the scene will appear, after that the object will remove and inside character nodes editor add this line inside any start function Code: Settings.variable = 0;