OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 2nd Ranger on 19 Jun 2005, 16:54:28
-
Hello,
I am making a mission which I want to end when the East side has only a few men left alive. I don't want to use East not present, because then you might be there for a while hunting down the last man.
Can the SideEnemy command help here? To clarify, I'd like a condition something like the following;
"alive _x" count units SideEnemy < 10
(That doesn't work, but it's basically what I'd like to happen).
Thanks for any help offered.
-
make a trigger, covering the whole map, east present, in the 'on activation' field put
all_east = thislist
in your end trigger condition field, put
(count all_east)<10
that should work.
-
Sorry bedges, but that won't work.
If you say at mission start:
all_east = thislist
then all_east will remain always the same - an array
containing all east units inside the trigger area.
I asume you were already thinking one step further when posting
this - didn't you? ;D
Well, the start sounds good:
trigger which covers the whole area, or atleast which covers
all east units on the map.
detected by: east present /activation once
condition: this
onActivation: all_east = thislist
And for the end trigger you use:
"alive _x < 10" count all_east
~S~ CD
-
EDIT
Thanks, but that doesn't seem to work either;
When I put "alive _x < 10" count all_east into the end trigger condition field, I get the error
Type number, expected bool
-
trigger east present
condition count thislist < 10
Your syntax is wrong in the example I think. Try
"alive _x" count all_east < 10
-
the answer. see attached ;)
-
Both of those work great. Thanks very much for the help folks :)
-
trigger east present
condition count thislist < 10
Your syntax is wrong in the example I think. Try
"alive _x" count all_east < 10
Hell, that happens when i put my fingers on things i didn't work with
for a long time, without looking before into one of my old missions ::)
thx for sorting the syntax qqqqqq ;)
~S~ CD
-
Can the SideEnemy command help here? To clarify, I'd like a condition something like the following;
"alive _x" count units SideEnemy < 10
(That doesn't work, but it's basically what I'd like to happen).
East countside (list Triggername) < 10
;)
-
Just to let you know 2nd Ranger,
Sui's line is worth a go, as my experience told me that
this version is more safe to work for sure when it's about
multiplayer.
There was always an issue, when units where mounted onto
vehicles, or when groups (including player or players) didn't
get the information like: oh no xxx is down.
Dead groupmembers were then still counted to the group, and
triggers or other conditions didn't fire.
Of course you can say now you don't want make multiplayer
maps, but then at least you know know :)
btw - 'lo Sui - long time no met in a post :D
~S~ CD
-
The mission was indeed intended for Multiplayer, so I guess I'll give Sui's method a try then. Thanks again.
-
Good to see you're still lurking around the place, Chris mate ;)