OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mike on 13 Nov 2002, 00:24:30
-
Hi the topic pretty much explains it all. I want to make it just on the ground.. as if I didnt add it to an actual object.. but preferably loaded..
and :cheers: to 1000 topics
-
Provided you have Resistance this is definately possible.
BIS added a couple of objects, one called "WeaponHolder" and one called "SecondaryWeaponHolder". It's these that make dropping weapons on the ground possible. So now you can use a bit of code like this:
wh1 = "WeaponHolder" createvehicle (getpos pos)
wh1 addmagazinecargo ["m16",1]; wh1 addweaponcargo ["m16",1]
To get yourself a loaded M16 lying on the ground at pos.
The "SecondaryWeaponHolder" is for adding things like LAW Launchers etc (Secondary Weapons funnily enough ;)). You can still add them to a "weaponHolder", but they stick straight up out of the ground for some reason ;D
Anyway, try that and see if it suits your purposes...
-
;D thanks ya berry much.. I wanted the player to be able to purchase weapons.. now that I can create em it should work ;D
:cheers: