I have an entity with about 70 children and I’m doing a “do…while” to select a random child and execute a function on its attached script, but I noticed that it generates a floating number…
How do I get a random number between 0-70, like 13 for example instead of 13.134234…?
Hmmm good to know! Well, since I don’t want my last child to be considered cause it is a different type (text) of the remaining children (buttons) it will be perfect!
I just need to delete the -1 in my code: choose2 = Math.floor(Math.random() * (this.entity.children.length-1));