[SOLVED]Enable an entity trouble

Hello, i have slightly modified my code and i have:

var enEnt= app.root.findByTag('terrain','wall',"Ttower","house","house1","house2","house3","sea","shop");
for(var t=0;t<enEnt.length;t++) {
                enEnt[t].enabled=true;
                if (enEnt[t].name==='Terrain') {
                    console.log(enEnt[t]);
                } // added this to see if the terrain entity was in the enEnt list
}

but the terrain entity seems to not show and the player keep falling endless, any clue?

Standard debugging questions:

Have you checked what gets returned by findByTag?
Are the tag names in the correct case?
Is the name you are checking against in the correct case?

@yaustar yes to all questions…will check again for the 20th time just to be sure

Can you provide a screenshot of what gets returned here?
Have you manually checked that the terrain entity is in that list?
Is everything else being enabled?

@yaustar when you asked me that question a dubt pop up in my mind, so i went to check and found where the tag was missing, since i had a main terrain group that inside had the terrain script, the trees, rocks etc. and i missed the tag in terrain script :sweat_smile: silly of me

Just checked and it works fine … sorry again, it made me loose my sleep tonight this silly thing

1 Like