OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SilentHunter on 13 Mar 2005, 23:24:18

Title: List Units
Post by: SilentHunter on 13 Mar 2005, 23:24:18
How do you list all the units in a mission without using a trigger

SILENTHUNTER
Title: Re:List Units
Post by: macguba on 14 Mar 2005, 00:58:30
Well, you just look at the mission in the misson editor and write them all down.
Title: Re:List Units
Post by: Planck on 14 Mar 2005, 01:06:50
 ;D


Planck
Title: Re:List Units
Post by: SilentHunter on 14 Mar 2005, 20:58:35
Quote
Well, you just look at the mission in the misson editor and write them all down.

You know what i mean  ;D

SILENTHUNTER
Title: Re:List Units
Post by: Planck on 14 Mar 2005, 21:04:09
I think what MacGuba means is, there is no other way to do it.

I can't think of one either.


Planck
Title: Re:List Units
Post by: ACF on 14 Mar 2005, 21:27:23
The only shortcut would be for named groups:

_arrayofallmyunits = [thisunit] + [thatunit] + ... + Units thisgroup + Units thatgroup + ...

But it's hardly earth-shattering.
Title: Re:List Units
Post by: Terox on 14 Mar 2005, 21:54:30
if your reason for not using a trigger is because of cpu strain, then simply have it

a) just run once
b) if required to run more than once but not at the usual looping speed of a trigger, then activate, deactivate it by having a script state a boolean as true or false

if you only need it to run once, but not immediately, then set its countdown timer


if its a list of all players you need, then you could go down the route of using coc network services