Im using the third person blueprint file, what i want to accomplish is, while the player holds the spacebar, it can take the amount of time the button is held, and multiply that by a “jump force”. So that the longer/shorter the player holds the button, the more or less charge he builds up. And when the button is released, do a jump based on those parameters. Of course there needs to be a maximum force the player can charge up.
You’ll have to play with the variables to get the desired effect. The Charge_Jump Event is called by an Event Tick so it runs every frame into the Gate. The functionality is there, have at it and make it better!
And also, the first jump doesn’t work, the process only starts with the second jump. I think its because I have an Event Tick calling Charge_Jump then that to gate, but im not 100%.
Disconnecting should be fairly simple. You can just get rid of the “Is Double Jump” Branch, the Sequence After “On Landed” and the Double jump section.
Then hook the executions up as shown here. I hope this helps. Let me know if you have any other questions.
Ok so i did the BP however i’m not 100% sure its working (its either too small to be noticeable or not working). Is there some way I can change the jump height so i can see whats going on? Thanks!
It’s just a debugging icon, completely not needed to get anything working. You can right-click a pin and choose “Watch this value” to get it. That allows you to watch values change live during runtime.
You have to hold down jump for a while. I would suggest using the “Watch this Value” feature to see if they are changing. Make sure to set your Debug Filter to target the character.
Are you right-clicking the pin of the node or the node itself? You must click the exact pin to get the option. Pins are the colored circles on the nodes that you can drag from.
You’ll have to Play or Simulate in order for that to activate. Also, make sure to set the “Debug Filter” to be the character instance or it will have no target and display as empty as well.
Also, I tried Wes’ option and it works awesome, however I can just infinitely spam space and fly away. So if you could find a way to resolve this, it would be amazing!
The commented sections will fix the issue you are having as well as improve the overall functionality of it by adding a cap and setting defaults so, as well as eliminate spamming the button.
Yeah this works all well and good, but for some reason the first jump doesnt work, my character just has a screen bounce but doesnt move in the z axis. Thanks Wes!