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 get elapsed time since button pressed?

alt text

Guys,i cant find a solution to this and it seems it would be so simple.I setup this blueprint so i can have slow motion and it works,but i want the transition to be smooth,so i need the time dilation float value to go from 1.0 to 0.15 smoothly.I already created a curve float but i can't find a way to know the elapsed time after i press my slow motion key(i need to know so i can tell this value to the float curve and it can make the transition accordingly.)Please,i cant find help anywhere else,can someone help me?

Product Version: UE 4.19
capture.png (183.1 kB)
more ▼

asked Jul 11 '18 at 02:57 PM in Blueprint Scripting

avatar image

8 1 5

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

2 answers: sort voted first

When you press your button you can "Set timer by Event" and use the output of this to "Get Timer Elapsed By Handle".

This will give you the duration since the last press.

Drag off the red event parameter for the Set Timer node and type "Custom Event" and make a new one. You can have this event do something if you wish.

more ▼

answered Jul 11 '18 at 03:41 PM

avatar image

509 2 5 7

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


if you have boolean that says whether you are in slow-mo or not, then just interpolate float value between 1 and 0.15 in Tick method. You can use this node: http://api.unrealengine.com/INT/BlueprintAPI/Math/Float/Lerp/

Then you can use DeltaTime in the Tick method to change value of Alpha, let's say you want to change value by 0.5 per second (that means that you get from 1 to 0.5 in 1s), you can compute alpha value for each frame as:

lerpSpeed = 0.5

currentAlpha = currentAlpha - deltaTime * lerpSpeed

(or use + if you wanna get from 0.15 to 1)

Hope it helps.

more ▼

answered Jul 11 '18 at 03:33 PM

avatar image

78 4 5

avatar image vivalabugz Jul 11 '18 at 03:43 PM

If you want to avoid using the Tick node, you can try looking at timelines. It would be a good way to get the values you need for the specific time range you want. Here's the documentation page for Timelines and a good tutorial on timelines

avatar image ex3me Jul 11 '18 at 03:48 PM

fair point there :)

avatar image ken09block123 Jul 11 '18 at 08:10 PM

thank you people very much,now i have my problem solved!

(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