OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Crook 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...
-
Just use the random command.
So for a random weapon, just create a script like this:
_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 ;)