Home   Help Search Login Register  

Author Topic: How can I . . .  (Read 722 times)

0 Members and 1 Guest are viewing this topic.

imemyself

  • Guest
How can I . . .
« on: 26 Nov 2002, 02:07:07 »
Is there any way to place a gun in a mission so its on the ground and you can pick it up, like its just been dropped from the action menu?

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:How can I . . .
« Reply #1 on: 26 Nov 2002, 07:57:40 »
The object that makes dropping weapons possible is called: "weaponholder" (or "secondaryweaponholder" for secondary weapons. eg. LAW's, AT4's etc.)

You'll need to make one of those, and then add your weapons (and magazines) to it. So the code would look something like this:

wh = "weaponholder" createvehicle position
wh addmagazinecargo ["m16",1]; wh addweaponcargo ["m16",1]

So you would end up with a loaded M16 lying on the ground at position (position can be x,y,z co-ords, or (getpos object))