Hello everyone! I’m working on a greenlight redlight game, but i’m currently facing some errors in my code.
When switching to greenLight
, the code constantly verifies if the player have moved (in green and red light). Although I put conditions it verifies in both else
and if
case.
I think is because my function is in an Update
method. But i want it to repeat at a certain moment then stop, i decided to put it in the Start
function and make a while loop in the VerifyState
function (verify if the player moved or not during redlight).
But i’m just facing crashes, i don’t really know what to do now. But if someone has an idea how i can make to do a good state verifier it would really help me.
Here is my code:
// paste code here