i want a proc that selects from 4 random commands,
like i call the proc, then lets say it selects the third thing, that would be to change a var, and to say something.
ID:177176
![]() Oct 20 2002, 6:45 am
|
|
sorry im getting a bunch of bad proc errors, i tried to switch it around and fix some stuff, but i cant get this to work
|
Mysticmichael839 wrote:
I'm not quite sure but this might work I believe you meant to use == and not = in your comparisons. Try this: switch(rand(1,4)) if(1) do_thing_1() if(2) do_thing_2() if(3) do_thing_3() if(4) do_thing_4() Or you could do it this way: call(pick(/proc/thing1, /proc/thing2, /proc/thing3)) |
var/number =rand(1,2,3,4)
if(number = 1)
usr <<"The number was 1"
if(number = 2)
usr <<"The number was 2"
if(number = 3)
usr <<"The number was 3"
if(number = 4)
usr <<"The number was 4"