For some reason, when I touch the animation button, it shows the animation “down”, the frame is set to be 0 at the beggining of the scene. It wont play the animation “up” at all, unless i move the “if these conditions are true” block above the “if global variable frame = 0”, then if i do that, instead it plays the animation “up” and wont play “down”.
At quick glance, it seems that your animation “up” is being played just fine, but then the variable Frame is set to 1, so the next condition is immediately true, then the animation is set to Down.
These two animations change happen within a single frame, so you never see Up being rendered/on screen.
To solve it, you’ll need to create a timer to make sure the Up animation finishes playing before setting the Frame variable to 1.
This will be a new conditions with “The animation of CameraAnimation is finished” and “global variable Frame = 0”. Then, move the second sub-event to be outside “The cursor/touch is on CameraButton” event.
Create another condition to check if the animation has finished playing and Frame = 1 OR Frame = 2, and then set back the global variable Frame on that event.
Hopefully that’s not too confusing!
ps: not too sure why if you move the “if these conditions are true” block it wouldn’t work
At the gold 1 sign, I movd it so it’s not sub event of the first one, so it can switch animation even if the cursor is not on CameraButton.
At the gold 2 sign, I made action to immediately play and set animation in the same event, so the next condition will not get triggered immediately (animation is still finished, so I start it again).
EDIT: At gold 1 sign, I forgot Trigger Once, so your animation will repeat. Please put it in even though I forgot in image