OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: surpher on 19 Jun 2004, 19:32:45

Title: deleting the dead, not their weapons
Post by: surpher on 19 Jun 2004, 19:32:45
Hi All :wave:

I'm trying to write a script to delete dead bodies, but leaving their weapons and ammo behind. I've tried the Drop Weapon action but that did not work, probably because the unit needs to be alive to perform the action.

Any idea on how to go about it.
Title: Re:deleting the dead, not their weapons
Post by: macguba on 19 Jun 2004, 19:44:53
You might need to detect what weapon they are carrying, delete the whole lot then create a weaponholder with that weapon and location.
Title: Re:deleting the dead, not their weapons
Post by: surpher on 20 Jun 2004, 13:04:58
Not sure what you mean by weaponholder ???. I can detect the weapon they are carrying and position, but when I create the weapon, say a AK47 it does not appear (I can create a T80 though). I'm guesing you can't create a weapon with the createVehicle command. :help:
Title: Re:deleting the dead, not their weapons
Post by: dmakatra on 20 Jun 2004, 13:12:53
There's a tute somewhere that teaches you how to make a weaponholder. Try search ed depot.

:beat: *Gets Shot* :beat:
Title: Re:deleting the dead, not their weapons
Post by: surpher on 20 Jun 2004, 13:36:50
Thanks Guys :cheers:

Problem Solved ;D