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"

Hi there! I have two Actions set onto one button, Tap to Jump and Hold to Sprint. Both actions work however I don't want the player to jump if they're trying to sprint. Any Ideas?

alt text

Product Version: UE 4.13
Tags:
movementcode.png (400.2 kB)
more ▼

asked Feb 04 '17 at 01:23 AM in Blueprint Scripting

avatar image

Sykrow.
21 2 5 6

avatar image Unitrix Feb 04 '17 at 02:47 AM

I haven't looked closely to your blueprint, because i'm very bad with interfaces.

If you're talking about tapping spacebar to jump and holding spacebar to sprint, I would do the sprint function on the pressed execution pin, and jump on the release execution pin. maybe this is an idea?

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

1 answer: sort voted first

i have an idea.

1.set a timer when you press the button, the waittime can be a variable, just call "it's timetosprint".

2,the time duration you press( calculate at the moment you release the button) is less than the waittime, jump event execute.

3.In waittime you didnt release the button, the timer work! it's time to sprint,sprint event execute.

4.after you release the button,clear the timer

Finally,maybe it's the blueprint you need.alt text

buttontimer.png (201.1 kB)
more ▼

answered Feb 04 '17 at 07:53 AM

avatar image

Sharkafuc
35 4 5 6

(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