1st person "bumps" back on impact of an enemy

Hi all,

Can’t seem to find a thread on what I need, but I don’t even know what to call it. I have a basic “enemy” blueprint, right now just a fire particle, collision box, and sound:

I can get collision off it, but how control the location of the player (fps template) so that he jumps back 5 feet. I am thinking old school video game like, no death, just a grunt and pushed back.

Can someone point me in right direction for this?


You can try using “launch character” to launch it backwards. I use that myself for a special case jump upwards, but I don’t see why you can’t make it propel your character backwards and a bit up to create a nice backwards jump arc with that.

Thank you Bohrium - do I have to access it special? (Don’t have Ue4 in front of me). Is there any type on of contextural string I have to build to access it? (Thinking like accessing the hud: player controller->hud->cast to hud).

If its from the players blueprint that you are launching the character, then no, you should be able to just launch the player. Otherwise, you would need to access/cast to the player.

It is the human, the player, that I want to launch. How through an enemy blueprint can I access the actual 1st person playings position and change it based on contact. I tried to drag in the my character blueprint into my enemy blueprint to try to create a reference, but nothing.

I can cast to HUD…is it something like that? Never seen or used a reference to the “me” in game. Admittedly there is much I don’t know yet. Most actually! :slight_smile:

You could set up an event in your player blueprint that bumps the player back, then call that event from the enemy when the player collides with it.
I’m thinking an event dispatcher would work well here.

I believe I am closer achieving my goal than I was, but now am stuck. In short I want to impact a collision/particle “enemy” blueprint and have my player (fps template) bump back in that classic original zelda way from the nes. Just backwards. I already have a sound effect and timer penalty running for this, just need the player repositioning.

I got to this but as you can see it doesn’t compile. I think I am doing the same thing that controls WASD motion in the mycharacter blueprint, but this is in the enemy blueprint currently. I tried in the mycharacter as well, no luck.

At this point I am just tinkering with no real idea what could be the issue.

Can someone help a learning but motivated human?

Your movement input has no target. You could try putting in the player character into the movement input target to see if it compiles then. But I think that the movement input component is something that should be applied continuously and won’t cause much of an effect as a single impulse. I don’t know the rest of your blueprint so you might have it set up in a way that it works, but if it compiles and does something between “nothing” and “very little” that might be the next issue then.

But when I look at my MyCharacter bluepring, the AddMovementInput doesn’t have a target either.

I assume this is because it is in the MyCharacter, and “self” is enough to connect it to MyCharacter. How do I connect to the MyCharacter “character” if you will when doing this in an enemy blueprint?

Don’t do this from the thing doing damage. It sounds like you want lots of things doing damage, and you want one thing to always behave a certain way when it’s damaged. So do this from the player and you only have to do it once.

If you use point and radial damage appropriately, you can determine where the player was hit, the normal vector of the hit, and the shot from direction. You should be able to use any of those to determine what way to push the character back in the damage event. That way there’s no worrying about getting the player, there’s no communication between blueprints, you just do damage with the built-in system to anything that can take damage, and if it’s the player they’ll react appropriately.

@Veovis Muad’dib - in essence the “enemy” is a simple fire effect. You encounter the fire, your time gets a penalty. I thought as I wanted a number of fire effects that all have the same behavior upon touch (no weapons shooting) that it would make sense to have in fire effect enemy blueprint? If not, ok, I am open to suggestions.

Do you recommend setting this up in the “MyCharacter” blueprint? If so, what specific tools/functions would I use to move the character playable fps character? How can I connect the collision box in the fire effect “enemy” to a behavior or function in MyCharacter. Should I have a different “player” blueprint?

I keep looking up input movement (is that correct?), but 1. Most info is focused on keyboard or touch input, can’t find indirect input to control character, and 2. I can’t hook it up to function for the life of me!

I will send anyone that takes a print screen of what I want functioning so much positive energy that you will have the weekend of your dreams. Who is ready for a great weekend?

Thanks all, I appreciate your patience, trying to push through.