Jump to content
Sign in to follow this  
NGagedFX

A Few Simple Editor 'Commands'

Recommended Posts

I've been searching the internet for a few simple commands but I just can't find them. I want to use the following commands in the condition field of a few triggers, but after a lot of experimenting I'm still unable to translate these to ArmA language. I hope you guys can help me out with these:

Open:

all human players are in a chopper (every soldier on the map that is controlled by a human player and not the AI)

all human players are in chopper1 or chopper2 (some players in chopper1 and other players in chopper2)

player1 is in an airplane (in which airplane can be any plane on the map, so it can't be specified as plane1)

airplanes are empty (count crew (specification for planes in general) == 0)

people that are in a chopper and height > 800 (getPosATL player in (specification for helicopters/choppers in general)) select 2 > 800 ?)

Solved:

player1 is not in chopper1: !(player1 in chopper1)

chopper1 height > 800: (getPosATL chopper1) select 2 > 800

someone is in plane1: player in plane1 or count crew plane1 >= 1

no one is in chopper1 / chopper1 is empty: !(player in chopper1) or count crew chopper1 == 0

I might be new on the forum, but I've got some decent experience with the editor. Until now I've always been using work-arounds, but my clan asked me to make a 20 player Coop mission (here's some more info on it) and right now those WAs just make everything too complex, so I thought this would be the right moment to get everything straight. These basic commands really got me stuck and I think they are rather easy, so it shouldn't hurt your brains too much. :)

NGagedFX

Edited by NGagedFX
Keeping the startpost updated

Share this post


Link to post
Share on other sites

Checks to see how many men are in cargo (I think)

{(_x in crew heli1)} count (units squad1) <= 0

heli1 = helicopter name

squad1 = group name of squad

Checks to see if man is(n't) in helicopter/vehicle

!(man in uh60_1)

man = name of unit

uh60_1 = name of helicopter

Share this post


Link to post
Share on other sites

I just noticed that I had the 'only' 170 page edition, so I just upgraded to the Deluxe Edition. However, I can't find the type of commands I'm looking for in that guide.

---------- Post added at 02:40 AM ---------- Previous post was at 02:35 AM ----------

Checks to see how many men are in cargo (I think)

{(_x in crew heli1)} count (units squad1) <= 0

heli1 = helicopter name

squad1 = group name of squad

Checks to see if man is(n't) in helicopter/vehicle

!(man in uh60_1)

man = name of unit

uh60_1 = name of helicopter

Those were the 2 most important ones. I'll check them out tomorrow as soon as I have time. I knew about the Alive and !Alive commands, but didn't know that the ! could be used in other commands as well. Thanks a lot. :)

Share this post


Link to post
Share on other sites
player1 is in an airplane

player1 IN vehicle

someone is in an airplane

count crew plane >= 1

airplanes are empty

count crew plane == 0

chopper1 height > 800

(getPosATL chopper1) select 2 > 800

Edited by Cyborg11

Share this post


Link to post
Share on other sites

(getPos chopper1) select 2 > 800

getPos reacts to objects as well I believe, so if you're above a tall building then its gonna be noticeable in the z-coord of the getPos... for failsafe use getPosATL (getPos Above Terrain Level)

Share this post


Link to post
Share on other sites

This is simply one great community, you guys sure know a lot about the editor. I've given a little bit more detail on some commands since I think I might have explained them a bit unclear. I just tried all suggestions in the editor and they work perfectly. I've also updated the startpost with commands that have been solved in case other people might have the same questions.

Thank you very much so far. :)

Share this post


Link to post
Share on other sites

NGagedFX, This is a great thread. We really need to keep this thing going, maybe get it sticky'd. Just as a thread where someone can post a command they don't understand and someone, as Cyborg112 did, can just throw up a quick explanation. Like an ever evolving "Mr Murray's Editor Guide".

I know there's the comref, WIKI, this forum, etc. but sometimes it's just impossible for me to understand what some of these commands mean in plain english, even if it's pretty much spelled out. I'm a perfect example of this. I'm fairly adept at mission making but due to my lack of scripting knowledge sometimes even the simplest commands look like gibberish to me. Most of the stuff that Cyborg112 posted I've used and knew what they did cause someone told me to use it but I never had any clue what it really said. He just completely answered some lingering questions I had in the matter of a few seconds and that just expanded my mission making knowledge 10x.

So thanks guys for this thread and the quick explanations. This just made things a helluva a lot clearer when it comes to understanding what the hell some of these commands I use actual say and mean.

Share this post


Link to post
Share on other sites
all human players are in a chopper (every soldier on the map that is controlled by a human player and not the AI)

{isPlayer _x && !(_x in chopper1)} count allUnits == 0

all human players are in chopper1 or chopper2 (some players in chopper1 and other players in chopper2)

{isPlayer _x && !(_x in chopper1 || _x in chopper2)} count allUnits == 0

player1 is in an airplane (in which airplane can be any plane on the map, so it can't be specified as plane1)

vehicle player1 isKindOf "Plane"

airplanes are empty (count crew (specification for planes in general) == 0)

{vehicle _x isKindOf "Plane"} count allUnits == 0

people that are in a chopper and height > 800 (getPosATL player in (specification for helicopters/choppers in general)) select 2 > 800 ?)

This is a bit more tricky. You will have to create a function which creates an array (let's name the variable airborne) of the specified people:

airborne = [];
{
    if (isPlayer _x && vehicle _x isKindOf "Helicopter" && (getPosATL vehicle _x) select 2 > 800) then {airborne = airborne + [_x]}
} forEach allUnits

* Note that this variable will not be refreshed during the mission, so you'll have to run this function every time you'll want to have up-to-date list.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×