Jump to content
Sign in to follow this  
victim913

Setting up a leave group setup using the action menu

Recommended Posts

In the last campaign from arma2, warfare mode. There was an option for me to select one of my units and give him to another squad.

I know it was a way to select the leader and send to him, i believe using the communication or interact menu.

Anyone know how to put that in my mission?

Thanks

Share this post


Link to post
Share on other sites

Try this:

Place this in your init.sqf:

entry1 = player addAction ["Give unit1 a squad","squad.sqf"];

And this in "squad.sqf":

private ["_position","_grp1"];
_position = position unit1;

[unit1] join grpNull;
sleep 0.4;
_grp1 = group unit1;
sleep 0.3;
"Ins_Soldier_1" createUnit [(_position),_grp1];
"Ins_Soldier_1" createUnit [(_position),_grp1];
"Ins_Soldier_1" createUnit [(_position),_grp1];
"Ins_Soldier_1" createUnit [(_position),_grp1];

player RemoveAction entry1;

Where "unit1" is the unit that you want to create a squad for.

Works fine for me.

Edited by kyfohatl

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  

×