OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: iD_999 on 02 Nov 2003, 14:53:18

Title: Scripts Question
Post by: iD_999 on 02 Nov 2003, 14:53:18
Hi Everyone~

1: Does anyone know how to script the civilian to pick up weapon?

2:Is there any way to detect how many civilian the player kill???

CAn someone please tell me how? ???
Title: Re:Scripts Question
Post by: _hammy_ on 04 Nov 2003, 06:23:13
1: persons init field, this addmagazine "AK47"; this addweapon "AK47";this addmagazine "AK47"; this addmagazine "AK47"; this addmagazine "AK47"

i think im reading your question right....
Title: Re:Scripts Question
Post by: iD_999 on 04 Nov 2003, 07:51:28
Hi Hammy:

I think u have my question wrongly

I want to ask is that the if is possible for the civilian to pick up weapon on the ground. WHen a troop is dead
Title: Re:Scripts Question
Post by: macguba on 04 Nov 2003, 12:33:36
Yes, but you have to script it.     Your script would have to detect the appropriate dead unit (easy if this is for an Intro or something, more tricky in the middle of a firefight), get the civvy to walk over there and perform an animation, remove the weapon and magazines from the body and add them to the civvy.

If I remember rightly civvies can use pistols and rifles but they can't use rocket launchers and machine guns becuase they don't have a secondary weapon slot.

Kill list ... I suppose you could do it with event handlers.
Title: Re:Scripts Question
Post by: Chris Death on 04 Nov 2003, 14:59:22
Well, the answer to your "civie goes war" question you will
find in this thread:

http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=9376

And for question 2 (the killed-civie-counter) i'm with macca
and suggest you to start a search for the phrase:

eventhandler "killed"

Once you found it you need to do it that way:

Add an eventhandler "killed" to each single civie, you want
to be counted, when killed.

Now this eventhandler needs to start a script, where you
check, wether the civie was killed by the player or not.
If it was the player, then: add him to the kill list.

~S~ CD