Home   Help Search Login Register  

Author Topic: CountSide command  (Read 1795 times)

0 Members and 1 Guest are viewing this topic.

Offline Captain Crunch

  • Members
  • *
CountSide command
« on: 14 Apr 2007, 06:08:31 »
Hi.

I would like to make a trigger that will send choppers back to the base when most their enemies are dead. In the trigger's condition field I thought I'd put a snippet using the Count, Countside, CountFriendly or CountEnemy commands. Like:

Code: [Select]
RACS CountFriendly < 5
But ofcourse the syntax isn't right. Can anybody help me? Thank You.
Back to the forest!

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re: CountSide command
« Reply #1 on: 14 Apr 2007, 08:49:34 »
RACS countSide list triggerOne    :dunno: maybe this will help...


TCM

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: CountSide command
« Reply #2 on: 14 Apr 2007, 09:57:20 »
Why would you use the countSide/Enemy/Friendly since you can make the trigger to be activated only by the side you want so you do not need such commands.. :scratch:

  • Set your trigger to be activated by the side you want
  • Set the trigger type to switch
  • In the condition field type: (count thislist)<5
  • Synchronize the trigger with the chopper's waypoint previous to the waypoint to the base
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Captain Crunch

  • Members
  • *
Re: CountSide command
« Reply #3 on: 14 Apr 2007, 14:27:44 »
h-, Your help has been great once again. It works perfectly, and whats more, it is clear and simple. Thank You.

EDIT:

Oh, one more question about this Count command, what if I want to count cargo units in a chopper? Or just to count units in a chopper? Is this possible too?
Thanks.

Jason
« Last Edit: 14 Apr 2007, 14:49:16 by Captain Crunch »
Back to the forest!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: CountSide command
« Reply #4 on: 14 Apr 2007, 15:56:16 »
For counting the whole bunch of people inside a chopper, use count crew choppername.
The command crew returns everybody in the chopper (or in any vehicle) in order of [commander,driver,gunner,cargo] (if I remember correctly..)

For counting cargo there are several ways:
- Make a 'note' of the cargo position amount in an empty chopper in the init.sqs/sqf and save it in a global variable, using the command emptyPositions
Code: [Select]
someglobalvariable = choppername emptyPositions "cargo"and then later on compare that amount with the current empty cargo seats in the chopper and this way you get the number of cargo seats taken, which you can then use in counting the cargo..

- Use the new command getNumber. If your chopper is for example a blackhawk you can get the amount of cargo it can transport with getNumber
Code: [Select]
getNumber (configFile >> "CfgVehicles" >> "UH60" >> "transportSoldier")Which you can again compare to the empty seats you get with emptyPositions like in the above example

- You can also write a script that goes through the array given by the crew command and saves the amount of cargo in some variable. If the unit in the array is not commander, driver nor gunner, it is cargo..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Captain Crunch

  • Members
  • *
Re: CountSide command
« Reply #5 on: 14 Apr 2007, 16:16:32 »
 :clap:

Wow. Ok. You are pretty good I can guess. I'll try this out. Thanks again h-!
Back to the forest!