Well firstly on the first picture if you made the collision of the ball(enemy) correct everything should work fine there(except I think you need to change the jump to a lunch because jump works only if character stands on floor so it can not work properly), now to the second one first of all the jump pressed usually should be connected to the Jump first and really rarely after a branch(I don’t see a reason to do it here after a branch either). And you add lunch character after jump release with negative Z not really sure why you added that, so remove it(if you don’t need it). If not mistaken if you do these changes it should work.
Ps: And about the jump higher while holding the jump button you can add a timeline from a jump button that will add little bit velocity to the character while jump pressed is true and velocity z is higher than 0, it will not be enough to lunch the character to air but it will increase his jump while the button is held. Good luck.
In games like Super Mario, Donkey Kong, Crash Bandicoot & I think Sonic, if the player is holding the jump button as they land on an enemy’s head, then the player will be bounced considerably higher into the air than without the jump button being held down.
I’ve been trying to replicate mechanic in my game project; I have a jump collision box attached to the underside of my character & I have a basic setup where the player bounces continuously off the top of the cube I’ve been using as a stand-in for an enemy. The only thing I haven’t got to work properly is the holding the jump button when jumping off the “enemy”.
I have a setup for it that I’ve been experimenting with that sorta works but with some serious responsiveness issues. Some times it works with my character catapulting off the top of the enemy stand-in as intended, but other times the character simply lands on top of the cube, not even doing the little bounce that’s suppose to occur if the jump button isn’t being held down.
As I imagine, the current setup I have right now is most-definitely a complete mess based on my own inexperience with Unreal Engine & the fact that setup was hastily put together based on a random thought I had on how I could get it to work.
Something else that I would like to incorporate into the jump collision setup is the variable height jumping mechanic I currently incorporated into my character’s basic jump. Variable height jumping for those unaware, is when the height of the player’s jump is determined by how the player is holding the jump button, its present in most traditional-style platformers such as the games I mentioned at the start. As it stands, my current jump collision setup uses Unreal Engine 4’s built-in Jump node but I would much rather use the coding in my basic jump as shown above.
In your character movement component (assuming you have one) there is a setting called Jump Off Jump ZFactor. Crank it up. Your enemy must be of a Character class for to work. In your enemy character make sure that it’s capsule component has the setting Can Character Step Up On set to No. will make you player to bounce in the air when landing on the enemy without him having to press the jump key.
If you want to add additional boost if the jump key is down then in you player character create Event On Landed. Whenever your character lands you can check if the jump key is held down and if the thing the player landed on is a character. If both conditions are true then add an impulse, add velocity or launch the character or even better increase the Jump Off Jump ZFactor.
Okay, so I finally managed to get it working. As per [DDemon’s][1] advice I replaced the Jump event with a Launch Character one instead, which instantly fixed the problem. I’m glad to find out that my blueprint setup actually did work properly minus the whole Jump event fiasco.
After realizing my blueprint wasn’t a complete disaster, it occurred to me that I could use the Jump Pressed boolean variable I created for the Basic Jump setup for implementing variable height jumping into the Jump Collision portion. I used the variable to create a branching path that would trigger a Launch Character event that would interrupt my player character’s upward trajectory if the Jump Pressed variable wasn’t active.
I’m not sure what you mean by that? Everything seems to be working, if I release the jump button after bouncing off an enemy’s head the player character immediately begins falling.
Its hard to explain but try removing the pin to the -400 lunch in picture and it should not change anything, because an event is called only once and when you get to the second branch of Jump Pressed from the first there no way for Jump Pressed to change(and if there is the chances close to you shooting two bullets into the air and then hoping for them to hit each other) so the False of the second branch of Jump Pressed will never fire False.