OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Kane777 on 21 Oct 2002, 02:14:48

Title: HELP
Post by: Kane777 on 21 Oct 2002, 02:14:48
 ??? ??? i need help i need a full report on how to delete a guys weapon then give him a new one while making a mission :'(
Title: Re:HELP
Post by: Guru on 21 Oct 2002, 13:10:33
use the removeweapon ,removemagazine commands to remove his weapons and ammo. then use the addweapon, addmagazine commands to put stuff in IE:
in ur dudes init:
-
     this removeweapon "weaponname";
     this removemagazine "magazine name";
-
do the magazine one 4 times as he carries 4 magazines.
then:
-
      this addweapon "weaponname";
      this addmagazine "magazine name";
-
all of those go in the init line of your dude remove first then load of coarse.it will be a long line of code but it will fit.
you can get the weapon names and ammo names in the editors depot look for the "comref"(command reference)
Title: Re:HELP
Post by: I-RZ# on 21 Oct 2002, 13:40:38
Make sure you put the addMagazine commands first as you'll have to reload or might not possibly be able to fire anything :(
Title: Re:HELP
Post by: Wolfrug on 21 Oct 2002, 20:04:29
a much easier way of removing those pesky magazines is using the nice removeMagazines command (note the end -s) ;)

unit removeMagazines "magname"

A full list of weapons should be available in the Editor's Depot, if nothing else it's attached to the trusty old UCR (unoffical command reference). I heartily suggest you download that baby ;)

Wolfrug out.