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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Auto Sprint

Hello,

I'm trying to figure out how to setup auto sprint. What I mean is the following:

When I hold down Shift, I sprint. After lets say 1 second of holding, I let go and continue to sprint, until I press another input(ex aiming with mouse, fire weapon, or hit an object). So when I do any of those key presses or hitting a wall, my speed returns to normal.

Product Version: UE 4.10
Tags:
more ▼

asked Jan 04 '16 at 03:41 AM in Blueprint Scripting

avatar image

SyncFx
8 3 5 6

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

3 answers: sort voted first

Hi man Depending on what are you using you should: setup the shift key imput , or enable imput on your actor. When that is pressed you start a timer , you can read here how https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseTimers/Blueprints/index.html Otherwise you can take care of the time yourself , picking up the time from the tick event and adding to a var until you reach 1 (sec). When your var reach 1sec you add to your speed (movement component, or variable or what you are using..) And set another bool variable "Sprinting " to ON. There should be a event called keypress. that get fired everytime you press a key. In this event check if your variable Sprinting in On, if it is Set your speed to the normal average value... Or just decrese the speed until its normal.

more ▼

answered Jan 04 '16 at 01:37 PM

avatar image

Est_engine
1.2k 58 12 62

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

alt text

more ▼

answered Jan 04 '16 at 07:09 PM

avatar image

Dj EKI
36 14 10 16

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

You could do a sprint that happens and after a delay of one second, if shift is still down then shift stays on, then, when any key is pressed disable sprinting.

more ▼

answered May 24 '19 at 11:37 PM

avatar image

DETERMINATOR20
16 1 2

(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