OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: TERA_Forrest on 21 May 2004, 20:32:58

Title: civi hostage, enemy to kill him when players detected
Post by: TERA_Forrest on 21 May 2004, 20:32:58
ok, i've got a hostage i need with his hands up, but if west is detected in the area i need him killed by either of the two guards.  Thanks in advance.
Title: Re:civi hostage, enemy to kill him when players detected
Post by: Olphy on 21 May 2004, 20:48:36
Put this in the On Activation Trigger:

Playername dofire hostagename

BTW: If you have him in an EffectStand animation then you will have to write:

Playername switchmove "EffectStandNull"

Though I'm not too sure on the second one. Try looking at one of the tutorials here. But thats basically how it works.
Title: Re:civi hostage, enemy to kill him when players detected
Post by: macguba on 21 May 2004, 22:46:09
There is lots on this forum about hostage situations, have a good hunt using the forum search function.

There are several ways of achieving what you want, depending on the precise circumstances.    Probably the easiest way, if you want him shot by the guards, is to make him on the opposite side and write

this setCaptive true

in his init field.   Then, in your detection trigger (and assuming you have named him loon1) have this

On Activation:   loon1 setCaptive false

As long as the guards can see him they will shoot him.

Dofire is usually best preceded by a dotarget command:  however, coded commands like this only work on AI controlled units, not human controlled ones.    
Title: Re:civi hostage, enemy to kill him when players detected
Post by: TERA_Forrest on 22 May 2004, 05:08:27
works great, thanks fellas