x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Creating a charge build up to jump?

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.

how would i go about doing this in blueprints?

Product Version: Not Selected
Tags:
more ▼

asked Apr 07 '14 at 08:31 PM in Blueprint Scripting

avatar image

Leetums
16 3 6 7

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Hello,

I have made my own Charge Jump by using this video tutorial as a basis:

https://www.youtube.com/watch?v=aXmV66eobWI

Here is an image of my setup with my own personal changes:

alt text

Charge Cooldown's Default is 1.5, every other float is 0. All Bools are False by default.

You will need to do a "View Image" to see the whole thing. Let me know if you have any questions or if this helps you.

-Alexander

jumpcontrols.jpg (373.1 kB)
more ▼

answered Aug 11 '14 at 04:00 PM

avatar image Leetums Apr 07 '14 at 10:23 PM

Thank you so much! This is awesome!

avatar image AemonBarz Aug 11 '14 at 09:20 PM

How would we remove the double jump so taht we only get on single charged jump?

avatar image Alexander Paschall ♦♦ EPIC Aug 11 '14 at 09:36 PM

alt text

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.

jump2.jpg (129.8 kB)
avatar image AemonBarz Aug 12 '14 at 10:48 AM

Also what is that blue icon thing next to add floats and set ChargeUpdate at the top in the node connectors? Cause I dont have it on mine :(

avatar image Alexander Paschall ♦♦ EPIC Aug 12 '14 at 01:39 PM

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.

avatar image AemonBarz Aug 12 '14 at 10:46 AM

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 max jump height so i can see whats going on? Thanks!

avatar image Alexander Paschall ♦♦ EPIC Aug 12 '14 at 01:42 PM

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.

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Debugging/index.html

Let me know if you have any more questions.

avatar image AemonBarz Aug 12 '14 at 09:07 PM

I cant seem to find the "magnifying glass" next to a variables name. The box is blank with text in it stating the variable's name.

avatar image Alexander Paschall ♦♦ EPIC Aug 12 '14 at 09:37 PM

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.

avatar image AemonBarz Aug 13 '14 at 01:26 AM

Oh ok, I was just clicking on the entire node! Thanks!

avatar image AemonBarz Aug 13 '14 at 01:28 AM

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!

avatar image Wes Bunn ♦♦ STAFF Aug 13 '14 at 01:21 PM

Hey AemonBarz,

Try updating my original post with the following instead:

alt text

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.

-W

avatar image AemonBarz Aug 13 '14 at 09:32 PM

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!

avatar image Wes Bunn ♦♦ STAFF Aug 14 '14 at 01:14 PM

What does your Blueprint look like, is it the same as the one I posted?

avatar image AemonBarz Aug 14 '14 at 09:47 PM

The edges of the nodes on the sides are a bit cut off but you can still see the nodesalt text

ki.jpg (420.5 kB)
(comments are locked)
10|2000 characters needed characters left

Howdy!

I'm sure there's a bunch of ways to do this (may already be on AnswerHub) but here's one way you could do it:

alt text

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!

-W

chargejump.png (130.9 kB)
more ▼

answered Apr 07 '14 at 09:00 PM

avatar image

Wes Bunn ♦♦ STAFF
5k 145 64 206

avatar image AemonBarz Aug 11 '14 at 12:14 PM

Hey this works awesome but when I mash space, my character just flies up into the air endlessly. Any ideas on how to fix this?

avatar image AemonBarz Aug 11 '14 at 12:16 PM

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%.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question