Started by
DerexXD
on
Topic category: User side tutorials
You want to utilize the random block and create a NUMBER local variable (Right side)
I called mine random
Then SET the variable to Random 0,1 * 100
The Set block can be found in Custom Variables tab. The number is found in the math tab so is the multiplication sign
Drag a if, do into the area from the logic and loops tab
Next go to logic operators and take out the second one, with the symbols of comparison. Get the GET block from the custom variables tab. Set the symbol to less than and put your variable on the left side. The right side should be the percentage you want it to fall in.
In the "DO" part put in execute command (then put in the effect command)
Edited by DerexXD on Thu, 08/08/2019 - 17:10
You don't need to multiply this by 100, jus check if random is smaller than 0.4, but your approach is fine too.
hahah yes that is true
quick question. in the method presented is the chance to get the slowness effect 40%?
if so would changing it to 10 make it 10% and or 1 make it 1%?
Think about it this way. Random(0,1) generates a random decimal double between 0 and 1.
Because you multiplied this value by 100, it effectively generates a random decimal double between 0 and 100.
If you wanted to optimize this further, you don't have to multiply it by 100 or even not save it as a variable.
ahh i see makes sense make sense lol thanks fo the swift reply