Here:
when gf clicked broadcast [random v] when I receive [random v] set [variable v] to (pick random (-160) to (160)) if <<(variable) < [20]> and <(variable) > [-20]>> broadcast [random v] else stop script end
Last edited by jontmy00 (2012-10-09 03:29:56)
Offline
Better yet:
set [rand v] to (pick random (20) to (160)) if <(pick random (0) to (1)) = (1)> set [rand v] to ((-1) * (rand)) end say (rand)
Offline
Hardmath123 wrote:
Better yet:
set [rand v] to (pick random (20) to (160)) if <(pick random (0) to (1)) = (1)> set [rand v] to ((-1) * (rand)) end say (rand)
There's a more compact way:
set [random v] to ((pick random (20) to (160)) * (((pick random (0) to (1)) - (0.5)) * (2)))
Offline
ErnieParke wrote:
Hardmath123 wrote:
Better yet:
set [rand v] to (pick random (20) to (160)) if <(pick random (0) to (1)) = (1)> set [rand v] to ((-1) * (rand)) end say (rand)There's a more compact way:
set [random v] to ((pick random (20) to (160)) * (((pick random (0) to (1)) - (0.5)) * (2)))
True, but it's harder to read/understand.
Offline
*gasp* BUG!
Offline
Technically, the quotee didn't close the tag.
Offline