OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: ivabigmole on 11 Aug 2005, 23:04:58
-
hi i need heelp on editing the loadout of a unit like say i wanted to change a units weapons like get a civilian to have a m21 sniper i need help ive looked through the site and cant find any thing to help so can someone help me
-
I would start looking in the editors depot. It has many useful tutorials and also a FAQ (like the one you just asked in your example). The answer to your specific question is found in the Official Command Reference Guide (A.K.A Comref). And the easy way is...
this addMagazine "m21Mag"; this addWeapon "m21"
If you write that in the init line of your civ he will start with the m21 rifle and one magazine.
-
would that work with say a m16 soldure so he has a m21 sniper instead of a m16
-
It will work on any unit as long as you put "removeallweapons this" in the init of the unit before you give them a new weapon.
-
As nominesine correctly implies, always add a magazine before adding the weapon so that the weapon is loaded at the start of the mission.
Oh, and
Welcome to the forum!
-
Tnks every1 4 helping me u av been a lot of help now finialy i can create missions with my fav pep E.G blackops with snippers TNKS ;D