Arma 3
COOP Island Assualt
AI disembark from SDV
So... you said you don't know anything about scripting, so I'll try to keep this as simple as possible.
Please note that I have not tested this myself, and that there might be other (possibly even better) ways to do the same thing, this is just what I came up with.

Anyway, let's get started. First, we need a way to identify the groups involved. To do that, we put this in the init line of the playable group leaders:
First group:
group1 = group this;
Second group:
group2 = group this;
So, let's take that apart. "group1" and "group2" are variable names. You can use anything here that fullfills these[community.bistudio.com] requirements (basically it has to start with a letter).
"=" assigns the value on it's right side (group this) to the variable on it's left (group1, group2 or whatever identifier name you chose). If that was easy to understand, don't worry, it will become a bit more complicated later.
The "group" command returns the group of an unit (duh).
"this", when used in an init line, refers to the unit or vehicle in question. So "group this" refers to the group of the unit in whose init line the script is placed.
";" simply ends a code statement. I won't explain what a statement is here because it will either become obvious later on or you will be able to code without knowing what it is. :P

So... now for the intersting part. Go to the waypoints at which the groups should disembark, set their types to "move", and put this in the "on act(ivation)" lines:
if(!isPlayer leader group1) then { {unassignVehicle _x; _x action ["eject", vehicle _x]; } forEach units group1 }
Replace "group1" with the variable name you used for the group in question.

Time to break it down into it's components.
The first line checks if ("if(...)") the group leader ("leader group1") is not ("!") a player ("isPlayer"). If the group leader is a player, then we do nothing since players can order their group to disembark or eject themselves.
If the group leader is an AI, then ("then") a code block "{...}" is executed.
It contains a forEach loop ("forEach"), which executes another code block for each unit in the group ("units group1").
This code block takes each individual unit ("_x" within the forEach loop) and tells it that it is no longer supposed to be in a vehicle ("unassignVehicle"). Then it makes the unit perform the "eject" action ("action ["eject", ...]") to get them out of the boat for good.

Okay... I'm not sure if this was the best explaination. I tried to keep a balance between a simple explaination and an introduction to scripting/programming concepts here, and it may have turned out more complicated than necessary. If you have trouble understanding something or the code doesn't seem to work, just ask ;)

Woah, that was quite a lot of text for someone like me who usually sucks at writing.
< >
Showing 1-1 of 1 comments
donger  [developer] 14 Mar, 2015 @ 4:11am 
Thank you very much, I will try this out!
< >
Showing 1-1 of 1 comments
Per page: 1530 50