Arma 3
THE DARK POULET 2018 年 12 月 1 日 下午 1:09
Ai join or leave group player
hi !

this is what i found to make ai join or leave group on arma 3 editor.
you have to put this line in the init of each unit.


this addaction ["Ai join group", { [unitname] join player; }];
this addaction ["Ai leave group", { [unitname] join grpNull; }];


You have to replace "unitname" by some different name if you want to make it work with many units.

"Ai join group" or "Ai leave group" : can be change to anything : Bob join group / get the f*ck out bob :steamhappy:

enjoy !
< >
正在显示第 1 - 4 条,共 4 条留言
Dankan37 2018 年 12 月 1 日 下午 1:28 
You could improve it by replacing "unitname" with the unit pointed by the player.

"cursorObject", of course you would need to check it it's "isKindOf "Man".
diveyez 2018 年 12 月 6 日 下午 9:02 
I was just in a situation where, I am bleeding out, and waiting for my heli extraction bird. I would like to take what you are doing a step further, and also make that AI into QRF Medivacs. That land, join group, heal the wounded, then load them and RTB.
I have automedic code I wrote, but I would not be able to make that happen, to a moving medivac bird without some advice. Cab you guys help?

*Additonal: I wrote the code specifically for AI ACE Medicals on Advanced.*
最后由 diveyez 编辑于; 2018 年 12 月 6 日 下午 9:03
diveyez 2018 年 12 月 6 日 下午 9:10 
this addaction ["Ai join group", { [SARC_Medic] join player; }];
at which time, they should start the code I wrote correct?
OOster 2020 年 4 月 26 日 上午 7:11 
Here's an improvement, and a comprehensive breakdown I learned from Lou Montana on the Arma 3 Discord.

this addaction ["Your text here", // title

{ [Unit Name] join (Player); }, // script

nil, // arguments

1.5, // priority ( how high on your action window the script appears)

true, // showWindow

true, // hideOnUse (When you click the action the title disappears until you scroll to it again.)

"", // shortcut (A key stroke if you so choose)

"alive _target", // condition

3 // max distance for the action to display (In meters ofc, default is 50m)

];
------------------------------------------------------------------------------
end result for the units init:
------------------------------------------------------------------------------

this addAction ["Your text",{[Unit name] join player;},nil,1.5,true,true,"","alive Unit name",10];

this addAction ["Your text",{[Unit name] join grpNull;},nil,1.5,true,true,"","alive Unit name",10];

------------------------------------------------------------------------------

Basically now these two addActions allow you to, not only add or join AI to your squad, but now make the addActions disappear when the unit dies, and shorten the range which you can use the addActions :)
最后由 OOster 编辑于; 2020 年 4 月 26 日 上午 7:45
< >
正在显示第 1 - 4 条,共 4 条留言
每页显示数: 1530 50

发帖日期: 2018 年 12 月 1 日 下午 1:09
回复数: 4