Just a suggestion that the “Random Float in Range” function in blueprint should not be “pure” because it executes on every line pulled out of its return value pin (returning different values each time). This behavior is unexpected because functions without exec pins (“pure”) are expected to be const while this one is clearly not.
This might be true also for the other types, but I haven’t looked at them.
any time ive needed a consitent random value like this ( least i think this is what you mean) I throw that into a variable right away and pull from that
Thats the desired behaviour. Pure always gets called it just saves you from wire things up by Hand. Imagine how much manual flow management you have todo otherwise if you want multiple Randoms Values without a Pure Node.
And like Monodrobe said safe it in a Temporary Variable or Local Variable if you use a Function.
I can understand that it’s convenient, but it’s inconsistent with the conventions established by the blueprint language. (From what I understand). And I understand there is a workaround (which I did), but it seems more important that the language works consistently then there being shortcuts. (Technically it’s a bit of a deficiency in the language that “pureness” is not checked IMO).
There is not a single pure node (that I recall) that behaves like you say so I dont know what exactly you refer too. What for example will you expect as return in this case? (intial Location is random)
Or any other pure node that pulls a Value that you change inbetween?
I see what you’re saying, but in your example there is a clear sequence point that would change the value of actor-location whereas in random-float-in-range the side effects are “unexpected” until someone tells you “that’s the way it works.”
Either way, I’m getting the picture this behavior is “just the way it works” and won’t likely be changed. The work around is fine.