Is there a way to stimulate jumping using Blueprint?

I feel that this is stemming from my lack of experience with Blueprint, but I shall ask nonetheless. So far I have the Blueprint set up to work properly, however I must use the “Jump” function (may not be the appropriate term) in order to actually jump. It appears that the function has its own way to track whether I am in the air or not, and this interferes as I am keeping track of that. Is there a way to simulate jumping using Blueprint, change/modify the jump function, or must I resort to C++? Thank you in advance to all responses!

Yeah - the jump command is pretty specialized. But this is totally achievable with just blueprints! The Swing Ninja sample from the Marketplace should give you a pretty good idea how to implement double jump. Essentially instead of calling jump, you can just use the AddForce blueprint node, to impart the physical force you want and as often as you like.

Alternatively, you can set the Velocity of the CharacterMovement component directly (which is what swing ninja actually does)

Cheers,
Nick (Epic Games)

Exactly what I was looking for. Thank you!!

I just figured out your problem, but I can see someone from Epic has already helped you.

Either way, here it is!

More answers are always a good thing for archival purposes. Thank you as well!

No worries. When you’re in your Blueprint Class. Access the nodes and search for " Get Character Movement " under " Variables " and then " Character ".

Edit:
Also, if you happen to have the problem I had earlier attempting to get the Set Jump ZVelocity Node. You can start by creating the " Get Character Movement " Node, pick and drop the link. From there search for " Set Jump ZVelocity " under " Variables " and then " Character Movement ". (Make sure to have Context Sensitive on.)

I have what is probably an extremely nooby question, but how do you get the target slot for your “set variable” nodes? Specifically the one that sets velocity with the character movement target.

I’m currently trying to make my own character controller with a custom jump, and its little things like this that keep stumping me. Thanks in advance!

Ah hah! I’ve got to remember to try dragging nodes onto the canvas and searching for the things I need, thanks a bunch!

Hi SilentX`, I have added the exact same graph to the Side Scroller example into the character blueprint, but all I get is a small jump and still no double jump. Is there something I am missing? Thanks in advance

sure, here it is:

Awesome, thanks a lot SilentX` :slight_smile:

Hey Eterz, can you post that section of your Blueprint?

I would suggest adding a breakpoint to Set Velocity, to ensure its adding velocity but also that it is fired.

Here is an updated Blueprint of the same setup using the SideScroller Blueprint Example.

No problem, let me know if you have any issues!

Hello,

I have attempted both methods of double jump implementation shown here and have yet to get either of them to work. There are no errors of any sort just that the character just jumps normally. Here is what I have in the program currently. Any advice would be greatly appreciated

.

You seem to all want to go pretty complex. What about making it simpler like:

http://puu.sh/803oW.jpg

  • have the default “Jump” function do its job
  • add 2 boolean variables (one as flag for “first jump” and one as flag for “double jump”)
  • double-jump only if “double jump” flag is false
  • first time you jump set the first flag, second time you jump set the second flag
  • add Z velocity as an action when jumping (in addition to default “jump”, that’s no big deal)
  • when player lands reset both flags to false and you’re good to go again

I see all kinds of really complex ways to pull off a double jump.

I came up with the following double jump method in my Blueprint, it seems to work effectively.

It works well for my purposes and I’m sure there are plenty of ways to derive from this. Hope this helps some people. My next one is going to be a wall jump.

You prove a point. Your solution made my rethink my approach. Thank you for that. I’m going to use this for my next video tutorial. I’ll credit you for inspiration.

Glad I could help and that a solid more compact version can come out of this, these things are why I like being a part of these communities :slight_smile:

Don’t forget the ‘Launch Character’ function will increment speed on the vectors. So, if you don’t want to potentially have a rapidly accelerating character, set ZOverride to true (this is also useful if you’re making a “Dash” function, as well as “Wall Jumps”).

Ok I haven’t used either Gate, FlipFlip or LaunchCharacter yet. Didn’t know about them. Will have a try to see those in action once I’m back home.