Hello,
I am humbly asking for programming help regarding the random activation of states, I have a controller containing 10 states. I want to add code to my “triggerenter” script that will activate one of these 10 states at random every time the trigger zone is entered. The states are named “state1” to “state10” inside a controller named “OnStates”. Here<s what I have so far (just the random generator and an audio file):
const C2_wav = symbol.nodes.C2_wav;
var orbState = Math.ceil(Math.random() *9);
parent.on(“triggerenter”, (e) => {
C2_wav.start();
});
Thank you for any kind of help