Jump to content
Sign in to follow this  
lockjaw-65-

Spawn group to join squad

Recommended Posts

I have searched but cant find an answer. I want to spawn a group which will join my squad so I can command them?

What I am doing is creating a support group that you can call at anytime during the mission (this I can do no problem) The problem is how do you make the spawned group join your squad

Edited by LockJaw-65-

Share this post


Link to post
Share on other sites

With join or joinSilent.

(units name_of_group) join player;

Which assumes you have a reference to the group that was spawned of course.

http://community.bistudio.com/wiki/join

If you're looking for something more than that, I am not sure :)

Share this post


Link to post
Share on other sites

Ok I will try and explain things better;

I have a player on the map named s1

I have a radio trigger which has this in its init:

nul = [] execvm "Landsupportsquad1.sqf";

in the Landsupportsquad1.sqf is this

Grp1 = Creategroup EAST;

_Leader="TK_Soldier_SL_EP1" createUnit [getMarkerPos "GrpM", Grp1, "Grp1=this", 1, "Sergeant "];

_Unit2="TK_Soldier_EP1" createUnit [getMarkerPos "GrpM", Grp1, "", 1, "Corporal"];

_Unit3="TK_Soldier_EP1" createUnit [getMarkerPos "GrpM", Grp1, "", 1, "Corporal"];

_Unit4="TK_Soldier_EP1" createUnit [getMarkerPos "GrpM", Grp1, "", 1, "Corporal"];

_Unit5="TK_Soldier_EP1" createUnit [getMarkerPos "GrpM", Grp1, "", 1, "Corporal"];

_Unit6="TK_Soldier_EP1" createUnit [getMarkerPos "GrpM", Grp1, "", 1, "Corporal"];

_Unit7="TK_Soldier_EP1" createUnit [getMarkerPos "GrpM", Grp1, "", 1, "Corporal"];

exit

What im stuck on is where and how to put this code:

[_unitOne, _unitTwo] join player

Share this post


Link to post
Share on other sites
Ok I will try and explain things better;

I have a player on the map named s1

I have a radio trigger which has this in its init:

in the Landsupportsquad1.sqf is this

What im stuck on is where and how to put this code:

(units Grp1) join player;

since you create the group in the global variable Grp1 you can use it to with "units" that lists all the units in the group then you join that group to the player.

with (units Grp1) join player;

if that dosen't work

{

_x join player; // _x is local to the foreach loop

} forEach units Grp1;

Share this post


Link to post
Share on other sites

That worked fine! Thanks

Oh one thing that Im doing is making it a 10 player coop what what I need to put so that only player s1 can call support

Edited by LockJaw-65-

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  

×