Home   Help Search Login Register  

Author Topic: Random...  (Read 589 times)

0 Members and 1 Guest are viewing this topic.

Crook

  • Guest
Random...
« on: 02 Feb 2004, 06:25:30 »
Is there a way to make a script randomly pick items, like time of day, weather, or even what gun you start out with in a mission... Hopefully this is possible in 1.46...

j-man

  • Guest
Re:Random...
« Reply #1 on: 02 Feb 2004, 07:45:09 »
Just use the random command.

So for a random weapon, just create a script like this:

Code: [Select]
_number = (random 0.5)

removeallweapons player

?(_number == 0.1) : goto "addm16"
?(_number == 0.2) : goto "addak47"
?(_number == 0.3) : goto "addhk"
?(_number == 0.4) : goto "addbizon"
?(_number == 0.5) : goto "addmachinegun"

#addm16
player addweapon "m16"
player addmagazine "m16"

etc...



I havn't tested the script out, but it should work ;)