Can't Make Enemy That Only Moves When Jumping

Hello! I am currently trying to code an enemy that follows the player but only moves when they’re jumping. I’ve tried everything I could think of but I just can’t seem to find the solution to making this work.

My Blueprint/Code:

Is anyone able to help me figure this out? Thanks!

A bit more information could go a long way. It’s hard to tell exactly what you intend to do and what your problem is from the info you’ve given, but make sure that your On See Pawn event is actually firing when it should and that the cast isn’t failing. I’m pretty new to this, but your problem is probably in one of those :wink:

Assuming this is derived from character class If I remember correctly the AI Pawns Can’t Move unless their target is also on the nav-mesh. (They Can’t find the path to your Actor cus it’s flying in the Air)

Use “ProjectPointToNavigation” node and give it the location of your player what it will do is throw out the closest reachable point on the nav-mesh for your AI Pawn to follow.

Hope this helps.

dirty hack answer: using a timeline, just move the skeletal mesh up and down, not the actual character. something like this but with a character movement compenent (maxWalkSpeed) instead of floating pawn.