OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 14 Mar 2007, 21:55:23

Title: How many East are left?
Post by: The-Architect on 14 Mar 2007, 21:55:23
How do I count haow many East there are left on the entire island and then fire a script off when a certain number is reached, say 30?
Title: Re: How many East are left?
Post by: bedges on 14 Mar 2007, 22:25:32
hmmm, another one to be added to the faq perhaps.

use the old trigger-covering-island routine. activated by east present, 'on activation' field -

Code: [Select]
all_east = thislist
when you want to trigger the remaining east number <=30 routine, use

Code: [Select]
?({alive _x} count all_east <= 30) : ...
Title: Re: How many East are left?
Post by: The-Architect on 15 Mar 2007, 00:06:54
What?

Title: Re: How many East are left?
Post by: h- on 15 Mar 2007, 08:52:51
I personally can't help you much if you just ask 'What?'  :no:


Anyway, if you want the trigger to 'trigger' once there are 30 east units left then bedges' example is a bit faulty, otherwise it makes perfect sense.

If you want the trigger to 'trigger' once the count is 30 (and thus execute a script) put the next in the condition field of the trigger
Code: [Select]
({alive _x} count thislist) <= 30Of course the trigger should be set to east -> present..
Title: Re: How many East are left?
Post by: bedges on 15 Mar 2007, 09:41:16
example attached.
Title: Re: How many East are left?
Post by: The-Architect on 16 Mar 2007, 15:01:18
Cheers Bedges.   :sorry: