variable command line execute

hey i need to create a way for a slider from a ui to variate a number on the end of a command line command such as this

r.ScreenPercentage (1-100)

based on where the slider position is

and how to change a buttons color if it is selected or clicked on

Hey,

here is what i came up with for your Slider. Note: I’m using Engine Version 4.4.0

http://puu.sh/d9nDU/0139942e3d.png

thanks this helped alot but what was the thing that took the value and made it only be able to goto 100? i cant find it

The slider itself goes from 0.0 to 1.0. Thats a fix rule. So if you want to have a range from 0 to 100, you just have to multiply it with 100.

can you give me the dumbed down version please im still learning but the only rule for multiplication was vector * vector

okay wait i figured it out by looking up float * float but now i run into the problem where it dosnt recognize the command because it has a decimal point

nevermind i didnt put a space at the end of it the command before the int
but how can i get rid of the decimal place and makeit where it can only go from 25% to 100%?

To get rid of the decimal, you could just “floor” it to an int:

http://puu.sh/dbdCp/65f66d6a71.png

For the 25 to 100 % i have no clue. I only have version 4.4.0 at the moment, so i don’t know if they added some extra function for the sliders. I tried to make a work around, but even adding 25 to the slider value and setting it to 100 as soon as it is greater than 100 (e.g. 76+25 = 101 → 100) will mess up the slider. Because as soon as the slider hits the 75 mark, it is already 100, but the slider is only moved 75% of it’s range. So you would need to shift the starting point from 0 to 25 and leave the end point to 100. I don’t know if they added a range to it, or if i’m just to dumb to make a good workaround with some math.

in order to shift the start range, multiply the output of the slider by 75 instead of 100, add the floor node, then add an integer of 25. This will set the value to be 25 when the slider is at 0% ((075)+25) and 100 when it’s at 1.0 ((175)+25) and get rid of the decimal.