Cronnoc
(Cronnoc)
April 25, 2016, 7:46am
1
I would like to know if there is a way (in blueprint scripting) for me to change a variable based off how close another variable is to a number.
Example:
float A = 1
float B = 2
as A approaches 10, B approaches 14
(these are not the numbers I require they are just for example)
Is there an easy way for me to do this in the Unreal Engine.
I’m sorry for my bad phrasing, If you don’t understand the question please tell me.
MajekPL
(MajekPL)
April 25, 2016, 7:59am
2
Hard to say what you want. Could you try to explain it more?
You want to change a variable by the amount float A is away from 10 and float B is away from 14? Like float B is 12 away from 14 and therefore you change the first variable by 12? is this what you want?
Cronnoc
(Cronnoc)
April 25, 2016, 8:05am
3
As I said I am sorry, I am often bad at phrasing things.
In math there are limits. e.g. as x->20, y->∞
This is basically what I want to know if I can do (not using infinity obviously)
MajekPL
(MajekPL)
April 25, 2016, 8:09am
4
you want to limit the amount your float can have? if that’s what you want you can use a float clamp.
Cronnoc
(Cronnoc)
April 25, 2016, 8:16am
5
never mind I found another solution to my problem.
And I probably shouldn’t be trying to phrase things when I have been up since 4am
edit: lol didn’t finish sentence
MajekPL
(MajekPL)
April 25, 2016, 8:23am
6
don’t worry, maybe its just me not capable of understanding. have a nice day
Nawrot
(Nawrot)
April 25, 2016, 12:37pm
7
i think you are looking for this: