OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Scalptrash on 09 Nov 2002, 05:55:51

Title: Civilian death trigger???
Post by: Scalptrash on 09 Nov 2002, 05:55:51
I am making a mission where civilians are neutral and I want the mission to end if one of them gets killed.  I am somewhat familiar with the getDammage command used with a trigger but only for specific named soldiers.  Is there a way to make a generic trigger so that if any civilian gets killed the mission will end?
Thanks in advance!
Title: Re:Civilian death trigger???
Post by: Chris Death on 09 Nov 2002, 06:15:27
There are a lot of ways to do that;

here's one of them:

Create a trigger, covering the area, where your civie's are
supposed to be.
Activated by: Civilian
Condition: this
Onactivation: civilist = count (thislist)
Name this trigger by using it's name field (let's say: triggerA)

Now create another trigger:

condition: count (list triggerA) < civlist

This trigger should become active, once one of the civi guys
inside the trigger area has been removed from that earth  ;)

~S~ CD