Jump to content
Sign in to follow this  
mikey74

placing a single unit incharge of BIS_fnc_spawnGroup

Recommended Posts

_teamtype = ["USMC_FireTeam","USMC_FireTeam_MG","USMC_FireTeam_AT","USMC_FireTeam_Support"] call BIS_fnc_selectRandom;

_Team 	= [(getmarkerpos "groundPoint"), WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> _teamtype)] call BIS_fnc_spawnGroup;

_units = units _Team;

Would I put something like this to get a TL out of the group:

_TL = _units select 0; _TL = leader _Team;

Sorry Im not home to test this theory, and so far all my searches have come up with nothing. If anyone knows thanks for your help.

Thanks,

mikey74 :)

Edited by Mikey74

Share this post


Link to post
Share on other sites

You just want to grab the unit that's the leader of the spawned group? Just:

leader _team

would be enough, or use

_TL = leader _team;

if you had more than one or two things to do with the unit.

Share this post


Link to post
Share on other sites

Yeh I was needing to add some script to his init. So I wouldnt need

_TL = _units select 0;

at all? That beeing said. LOL Just curious as Im still not well versed in coding, but would

_TL = _units select 0;

select the Team Leader of that team?

PS. As usual Your wealth of knowledge is very appreciated. Ive learn a great deal from some of your answers on this forum. :)

Thanks,

Mikey74

pss

http://community.bistudio.com/wiki/leader Duhhhh Ive read it before but never dawned on me what it meant at the time of reading it!

Edited by Mikey74

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  

×