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"

how to set double jump height to half of max jump height

Hi, i'm using a script for double jumping, and i need the height of the second jump to be half the height of the characters jump. Thank you very much .

Product Version: Not Selected
Tags:
more ▼

asked Jan 16 '15 at 01:24 AM in Blueprint Scripting

avatar image

Conman
5 2 3 5

avatar image Conman Jan 16 '15 at 02:16 AM

i think its also probably worth mentioning that my game makes use of pickups that incrementally increase your jump height as you collect them

avatar image Wallhalla Jan 16 '15 at 08:12 AM

hey there,

would be cool if you show your script to help you in your specific case.

So without it i would something like that.

Variable sprintheight = somevalue; bool InFirstJump = false;

Event Press jumpkey ->

if (InFirstJump) { InFirstJump = false; do your jump with value of sprintheight / 2; } else { InFirstJump = true; do your jump with value of sprintheight; }

Additional: When player hits the ground after the first jump you need to set InFirstJump = false as well.

best regards

avatar image Conman Jan 16 '15 at 12:45 PM

heres the blueprint I use for jump

[1]: /storage/temp/26830-double_jump.png

double_jump.png (121.6 kB)
avatar image Conman Jan 16 '15 at 03:18 PM

thank you for your help wallhalla

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi conman,

I slightly modified your blueprint, try it. alt text

Hope it helps!

doublejumpz.png (125.9 kB)
more ▼

answered Jan 16 '15 at 02:10 PM

avatar image

Gleb.Bulgakov
1.8k 76 19 143

avatar image Conman Jan 16 '15 at 03:17 PM

Thank you very much Gleb, I really appreciate the help. I'm very new to blueprint, and i'm still having a little trouble between the launch character and float node. again, you're help is greatly appreciated.
alt text

2xjump.png (104.7 kB)
avatar image Gleb.Bulgakov Jan 16 '15 at 05:07 PM

Hi ,

It looks same, except you setup all vector components to same value. Try this: break link launch velocity. Right click on Launch Velocity -> Split Struct Pin and connect variable only to Z component.

avatar image Conman Jan 16 '15 at 06:01 PM

Thank you!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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