OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mr.BoDean on 22 May 2003, 09:35:20

Title: Empty added Weapon after RemoveWeapon
Post by: Mr.BoDean on 22 May 2003, 09:35:20
How do you make a unit's new weapon start off loaded with just a simple command in a unit's Initialization??

Ex.:
Unit = P1
Type= Soldier
Init. : this RemoveWeapon "M16"; this RemoveMagazines "M16"; this AddWeapon "G36a"; this AddMagazine "G36aMag"; this AddMagazine "G36aMag"

So I get my G36 with 2 clips, but the gun is not loaded until using the "Reload" command. I checked the Command Ref for something like "ReloadWeapon" or "LoadAmmo" , but saw nothing appropriate.   :-\
Title: Re:Empty added Weapon after RemoveWeapon
Post by: Kaliyuga on 22 May 2003, 09:50:44
you have to add one mag before the weapon


this RemoveWeapon "M16"; this RemoveMagazines "M16";this AddMagazine "G36aMag";  this AddWeapon "G36a"; this AddMagazine "G36aMag"; this AddMagazine "G36aMag"



and then it will start already loaded ;)
:cheers:
Title: Re:Empty added Weapon after RemoveWeapon
Post by: Mr.BoDean on 22 May 2003, 10:14:06
DOH! I stumbled on that by accident right before I checked back here! Thanx, Kali.  ;)