Home   Help Search Login Register  

Author Topic: Counting units  (Read 594 times)

0 Members and 1 Guest are viewing this topic.

jack_bauer

  • Guest
Counting units
« on: 01 Oct 2003, 07:13:20 »
Hi all, I have a question on counting units in a certain area.

I'm making a paratrooper mission, and immediately after the platoon jumps in, I have all the squads meet in one area.  I have their waypoints set up with a condition to hold them until I verify that they're all there, so that nobody goes rushing off on their own.

I'd like someone to help me out by showing me how to count the number of paratroopers (I've already put them all in _units in the init file), subtract any dead ones, and then compare that to the number of paratroopers who are in the staging area.  Basically I want to make sure that all the guys who are still alive are there so that they can all start moving to the objective together.

Thanks in advance.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Counting units
« Reply #1 on: 01 Oct 2003, 07:19:38 »
This is beside the question your asking, but would you consider an alternative method?
You said you have waypoints for all the paratroopers to meet in a certain area. Why not use some conditions in the 'on activation' fields of those waypoints. For example:

In paragroup1 wp on activation field: paramove1ready = true
In paragroup2 wp on avtivation field: paramove2ready = true
....

Then use a trigger to detect all these.

condition:  paramove1ready and paramove2ready and ...
on activation: whatever
Not all is lost.

jack_bauer

  • Guest
Re:Counting units
« Reply #2 on: 01 Oct 2003, 07:24:00 »
Ohhhhh...

I see - that would probably be easier, yeah.

It's been a while since I've edited, I need to brush up on all this stuff again  :beat:

Thanx!
« Last Edit: 01 Oct 2003, 07:24:51 by 24jack_bauer »

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Counting units
« Reply #3 on: 01 Oct 2003, 14:27:52 »
Or . . . you could just synch the three waypoints at the assembly point . Each unit will wait until all three assembly WPs are completed - with no scripting!
My gut feeling would be to use MOVE WPs at the assembly point if the units are just waiting to move on, the AI might get in the way if you use a HOLD WP.

jack_bauer

  • Guest
Re:Counting units
« Reply #4 on: 01 Oct 2003, 16:28:13 »
I had tried syncing them all, but for some reason it didn't work.

But I've figured it out now, and it works fine  ;D