Why is my animation not triggering?

I am trying to make an animation for a pressure pad occur ONLY when the player has picked up a “grow” powerup. I can tell the variable I made for the event is working based on the print that is coming up on the screen when the player goes from normal to large and then back. My pressure plate animation runs fine until I add the condition to it. I can’t figure this out. Any and all advice would be greatly appreciated!


Um it seems like you have things in odd places. I think you have a platform scroller game. I think you have it so that the Character changes to double size for 3 seconds and then becomes half the size. So if you get 2 of these in 1 second, it will temporarily become 4 times the size.

I’d have it so that the pressure plates just trigger a function call in the player (or create a gem that when touched calls the function). As in A player touched me. Call function “EventGrow” The character will then just respond based on their current state and what they should do based on that information.

The plate itself could do whatever it does when touch by a player. Event “ImTouched” = Play 2d sound, play particle FX, do movement or disappear. Whatever it does. If it’s touched my a “IsLarge” player, then if can play a “ImCrushed” animation or whatever it does.

So Overlap event is cast to player, and get the"IsLarge" boolean from the player. Then if IsLarge = true, then PlayAnimation.

Not sure if this helps but it’s best to keep things separate and have them handle their own information, and pass that information onto others IF the others NEED to know that.

From what I can see there, your PlayerIsLarge variable is inside the gem? And the plate reacts to the gem? Like Gem has a phrase ready to say which is, “I made the player Big!” And the plate goes. “Oh a Gem touched me and the Gem is saying he made a player big. Okay Gem, I’ll play an animation because you made a player big and you touched me.”

And I’m not sure if that makes sense to me. I don’t understand the context of the situation for that to happen.

Anyway hope this helps.