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 make a variable change loop from a min and max?

I followed this wiki tutorial and have it exactly as instructed: https://wiki.unrealengine.com/Pick_Up_Physics_Object_Tutorial

Everything works! I am trying to add on top of that, an ability for the float value that is multiplied with the forward vector to change based on how long the key was held.

alt text

I've tried float range but only found Random Float in Range from Stream . I'd like the range to increment between two numbers.

alt text

Any help will be appreciated. I've tried a couple of things such as a custom Timetable and Get input key time down

Im certain I am doing it wrong.

Product Version: Not Selected
physicshandle08.jpg (104.1 kB)
untitled.png (18.9 kB)
more ▼

asked Dec 14 '14 at 11:29 PM in Blueprint Scripting

avatar image

21 4 5 9

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

1 answer: sort voted first

Why not use another variable and simply increase it each tick by a value times delta time (so different fps won't affect this effect).

You can clamp the value right before the usage which would set the limits you want. Whenever you press the key reset that new variable and you're good to go.



more ▼

answered Dec 14 '14 at 11:46 PM

avatar image

5.9k 291 86 293

avatar image konker777 Dec 15 '14 at 12:02 AM

Im quite new at this and the jargon hurts my brain. Im assuming you mean something similar to this? http://i.imgur.com/ZMmh1c7.png

If not, can you kindly send me to a tutorial or show me what you mean? I have the blueprint exactly as the wiki.

avatar image Erasio Dec 15 '14 at 08:49 AM

I don't know any tutorial about this and don't have unreal here right now but let me try to explain it a bit better.

You don't want the clean time but just a value with a min and max border right?

Well instead of this "get input key time down" you can each tick if your branch is true (and by tick I mean each time event tick is called which is each frame) add a value to that variable. Don't set it new. Just get that variable and add a value.

And this value should be delta time (which is the float output of event tick and represents the time since the last tick) multiplied by the value you want your variable increased by each second.

Before you use the variable use the node "clamp". It takes a min and max and will only output banks in between or either of those extreme values.

I hope this clears it up a bit.


(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