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)?

For the sake of testing, I just put a timer right off the begin play. Set to looping, every 4 seconds, feeding the built in jump function. Yet, the enemy comes to the player in a BEU way and there is no sign of jumping or any vertical activity. So, I got a ref to the enemy inside the player 00, and fed the right shoulder button feed to a custom event feeding a print string and then the jump. The print string proved I was getting fire, yet still no enemy jump. Something different must be going on here…

Single player for now Rev. But I got some ideas the other day actually how to do a multiplayer beat em up, but its way over my head.

Could the enemy having a physics handle component added be doing this? I had to add it for the whip weapon.

I’ll run a demo sometime tomorrow. I’ve had bots that do random jumping before.

1 Like

Does no one have any ideas here? I once was able to use offsets to simulate jumping but it is not working out this time.

Something must be going on that is locking it down. Because it is a character bp and not being controlled by a player. Why else would a signal going to the default jump function not work?

What kind of Beat Em Up where the enemies can’t jump kick?

bump bump

Don’t let this noob thread title fool you. Seems simple I know yet here it isn’t for some reason.

The regular CMC Jump works fine in my demo.

1 Like

Does your enemy bp have the Can Jump option ticked in the movement comp?

Either way, it might be easier to just use the Launch Character function, as that will give you finer control over the jump direction.

1 Like

Jump is enabled by default.

1 Like

Yea, but they could have turned it off at some point for some reason and forgot about it. I did that once while sorting out how to limit which enemies could jump. Came back to project a few weeks later and was shocked to notice npcs forgot how to jump lol.

1 Like

It was on, and neither jump or launch character does anything although it is being pinged every 4 seconds here. And that is what makes it weird and I feel something is going on here. Because its not being possessed or using any AI controller. I have made the enemy movements from scratch and I do not use NavMesh.

Nice map btw. But Rev are using an AI controller? Cause I am not. I made the movements from scratch. And because I did that it may be locking down the bp or something and not letting it work. Not even launch character or add impulse does anything.

Yeah it was on. I have no idea why either the default jump or even launch character or add impulse does not work.

I have ai controller, auto possessed on spawn or placed.

You need a controller for the CMC functions and Ai move to.

Server has to apply launch/force etc.

1 Like