OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: angora on 04 Aug 2004, 14:59:39
-
i was wondering if its possible to change the weapon a unit has at the begining of a mission i made-up e.g. a soldier with an M16 would start with a M21 or somthing. (this may seem a really stupid question but i just don't know how to do it)
-
Look up the commands:
addweapon
addmagazine
removeweapon
removemagazines
removemagazine
:beat: *Gets Shot* :beat:
-
im not totally sure but i think in the initit. feild put this addweapon "ak74" but im not totally sure about that, sorry if its wrong
-
well... you first want to start out by removing all the weapons the guy carries by default by using:
removeAllWeapons this;
then, you want to add a magazine for your new weapon:
(you need to add a magazine before the weapon, or else the guy will start with no ammo and have to reload straight away)
this addmagazine "M21";
Finally you can add the weapon:
this addweapon "M21"
and then some more clips:
this addmagazine "M21";
and we may as well give the guy his grenades back too:
this addmagazine "HandGrenade";
so we end up with an init line that looks like this:
removeAllWeapons this; this addmagazine "M21"; this addweapon "M21"; this addmagazine "M21"; this addmagazine "M21"; this addmagazine "M21"; this addmagazine "HandGrenade"; this addmagazine "HandGrenade"; this addmagazine "HandGrenade";
a complete listing of all the BIS weapons and ammo can be found here:
http://www.ofpec.com/editors/browse.php?category=1_5&start=50
:cheers: