When I start my game and create my objects, I give them a random animation (still image).
Based on what animation number they have I want to do different things.
If the animation number is 14 I don’t want one condition to be run but I want another condition instead. My code ignores the conditions that I have made. Please tell me why!
Create an Object Variable in your Object and when you assign the random number for the Animation set the Object variable to the same random number, then access the Object variable to check if is not = 14
Now I checked the object variable “Rightshelf.Animation of Rightshelf” and it works by ignoring the instances that have the animation number 14. So far so good!
But in the next condition where the code should run instances with animation number 14, it ignores them too. That’s weird. Any ideas?
I solved it!
I chose the condition “comparing two numbers”, instead of comparing the object variable with 14.
Now it works fine