OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Thomas G Vorm on 15 Nov 2007, 19:40:35
-
Hey everyone, I'm trying to think about how to write this code but I can't come up with anything so I thought I'd just ask. Pretty easy I'm sure, I'd like to check when all units group player are on board heli1. But I don't know the code. Basically I'm having a chopper land, then once myself and team mates are on board the chopper takes off to another destination ~15 mission ends. Any suggestions?
Python1
-
// SQF
if (({alive _x} count units group player) == ({_x in heli1} count units group player)) then
{
hint "all aboard";
};
// SQS
? ({alive _x} count units group player) == ({_x in heli1} count units group player):hint "all aboard";
-
Looking at the sqf...
You could use the same technique to determine if all the live units on one side (blufor, for instance) were in helos, eh? Even if they were in different groups?
Or even, to set a destination for all live groups on one side.
:good:
-
Great, thanks guys, just what I needed
Python1
-
Trexian, as long as you get the list of units of a particular side. And for that purpose you will need to use a trigger covering all the map.
-
Hmmmm... could your (I think it's yours) :) out-of-bounds script be tweaked to keep a bunch of guys in one particular area?
The basic idea is an assault on an area, then a withdrawal, so the right groups would be in a relatively small, well-defined area.