OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Bomberman on 12 Oct 2002, 00:03:35

Title: activate when 80%...
Post by: Bomberman on 12 Oct 2002, 00:03:35
i want a trigger to activate and end the mission and play the lose outro only if 80% of "bravo" squad is dead. how do i do it?
Title: Re:activate when 80%...
Post by: seanver on 12 Oct 2002, 00:25:01
Use this in a trigger

("Alive _x" count units bravo) <= x

PUt instead of x the number of man that will be alive when the 80% is dead. I mean, if there are 10 men, put there 2, so 8 or more will be dead when the trigger gets activated.

Now in its On Activation field put final=true.

Now create another trigger, Condition final, with the end you want
Title: Re:activate when 80%...
Post by: Black_Feather on 12 Oct 2002, 04:19:48
or you can use this to get a percentage, 0.8 is 80%

"!Alive _x" count units bravo >= 0.8 *Count units bravo

Title: Re:activate when 80%...
Post by: Azraell on 12 Oct 2002, 08:12:32
heres a condition that someone here showed me....


?: count (units groupa) < (groupacount * 0.2)

    go=true
Title: Re:activate when 80%...
Post by: Bomberman on 15 Oct 2002, 03:26:00
hey thanks guys! do i have to assign a name to the group? isnt it something like bla, blah foreach "bravolead" ? lol