Home   Help Search Login Register  

Author Topic: Counting living units on the enemy side  (Read 1433 times)

0 Members and 1 Guest are viewing this topic.

2nd Ranger

  • Guest
Counting living units on the enemy side
« 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.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Counting living units on the enemy side
« Reply #1 on: 19 Jun 2005, 17:13:15 »
make a trigger, covering the whole map, east present, in the 'on activation' field put

Code: [Select]
all_east = thislist
in your end trigger condition field, put

Code: [Select]
(count all_east)<10
that should work.
« Last Edit: 19 Jun 2005, 18:40:54 by bedges »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Counting living units on the enemy side
« Reply #2 on: 19 Jun 2005, 18:30:02 »
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
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

2nd Ranger

  • Guest
Re:Counting living units on the enemy side
« Reply #3 on: 19 Jun 2005, 18:32:01 »
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
« Last Edit: 19 Jun 2005, 18:42:18 by 2nd Ranger »

qqqqqq

  • Guest
Re:Counting living units on the enemy side
« Reply #4 on: 19 Jun 2005, 18:57:02 »
trigger east present
condition count thislist < 10



Your syntax is wrong in the example I think.   Try

"alive _x" count all_east < 10

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Counting living units on the enemy side
« Reply #5 on: 19 Jun 2005, 19:01:40 »
the answer. see attached ;)

2nd Ranger

  • Guest
Re:Counting living units on the enemy side
« Reply #6 on: 19 Jun 2005, 19:09:02 »
Both of those work great. Thanks very much for the help folks  :)

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Counting living units on the enemy side
« Reply #7 on: 19 Jun 2005, 22:18:55 »
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
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Counting living units on the enemy side
« Reply #8 on: 20 Jun 2005, 04:16:26 »
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

;)

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Counting living units on the enemy side
« Reply #9 on: 20 Jun 2005, 08:29:33 »
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
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

2nd Ranger

  • Guest
Re:Counting living units on the enemy side
« Reply #10 on: 20 Jun 2005, 14:44:16 »
The mission was indeed intended for Multiplayer, so I guess I'll give Sui's method a try then. Thanks again.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Counting living units on the enemy side
« Reply #11 on: 21 Jun 2005, 10:47:57 »
Good to see you're still lurking around the place, Chris mate ;)