How to simply make an enemy character jump?

I have had that work at other times for sure but rn it is being difficult for some reason.

The blueprint is just a copied player character bp. I have tried several different ways, firing an event and just triggering a jump as normal. And also add impulse and launch character is not working.

Any ideas what is going on? Thanks

Hi,

May you be great.

Are you sure you have a valid character (enemy) reference?

If you do, simple call ACharacter::Jump, this will solve your issue, if it not working is because you don’t have a valid Enemy.

I have done a simple implementation and it’s worked just fine, check it above.

Note: I have implemented using Cast and Interface (you can pick one or other).

Player Hero (Getting Enemy’s Ref by Interface or Trace):

Enemy Interface Implementation:

Result:
Debug Key T

Debug Key G

The only conclusion I’ve got is: you don’t have a valid enemy reference.

Remeber, I’ve used two method, I mean Interface and cast, you can also use event by time, event dispatcher and so on.

May this help you, if you need any other help, let us know.

1 Like

Hello there!, thanks for taking the time to make all this btw, I appreciate it. It is not a reference problem as I’m trying things directly in the blueprint. For testing purposes, I just set a set timer looped to 4 seconds off the event begin play within the enemy blueprint. I added a custom event and connected to the timer and fed this to the default “jump” function and nothing is happening.

See what I mean?

Hi,

Are you sure your cast is not failing?

Maybe they are failing and thats why your timer is not being caled.

I believe the yellow arrow is being called (cast is failing), consequently, the other output is not being called, simple add a print to each arrow in order to see which one is being triggered.

If you add a print to the green one, you will see it isn’t being called.

Look, I think I came up with the solution. Add of 2 second after begin play, than the timer may work property.

Also, another way to check is open your enemy blueprint after press play and select the Debug Enemy, this way we can be sure if Jump is being called.

If you see below, in my case the jump is being called property:

Singleplayer, multiplayer (listen or dedicated)?