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"

Variable : Value range ignored ?

Hello folks,

When I saw the option Value Range in the details section of the variables I was pretty happy to be able to do so without scripting it. But when doing tests, I realized I am either using it wrong or it is not working as intended.

Has anyone experienced that as well or could help me out to use it properly ?

Value Range : The range of values allowed by this variable. Values outside of this will be clamped to the range Picture

Product Version: Not Selected
Tags:
more ▼

asked Dec 11 '14 at 06:48 PM in Blueprint Scripting

avatar image

Genova
258 21 24 35

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

1 answer: sort voted first

Value range is for controlling of setting up values in editor via Defaults tab. If someone puts value higher/lower than specified range, it will clamp. If you want random number between certain values, use Random Float in Range node.

more ▼

answered Dec 11 '14 at 08:00 PM

avatar image

Slavq
1.9k 151 149 201

avatar image Genova Dec 11 '14 at 08:36 PM

So, it's only meant for user control and it doesn't dynamically clamp values when running the script ?

avatar image Slavq Dec 11 '14 at 08:45 PM

I've just tested it and seems like yes - when i change value in runtime to something outside the specified value range it doesn't clamp it. (In my case i've set value range to 5-7, then changed the value during gameplay to 8/20/100/500 etc. and it remained 8/20/100/500 etc. It works in Defaults tab though.

avatar image Genova Dec 11 '14 at 09:27 PM

Yeah well okay it's the same as me. Too bad I really liked the idea of variables with their own clamp. Guess it would make them heavier if that was the case. Anyhow, thanks

avatar image Benni.Lodge Dec 14 '18 at 04:05 PM

Yeah, I'm also disappointed that there is no in-built clamp. Oh well.

(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