Birkoff 0 Posted June 22, 2009 In my team I have various units that will come and go, I can use teamswitch to switch between them but when I do the highest ranking unit is still team leader. What I want todo is use teamswitch to swap to another character and then that character is automaticly the new group leader. I been toying arround with > onTeamSwitch ('_grp = units group _from; hint format ["gruppe: %1 ",_grp]; _to setLeader _grp; _from setRank "Private"; _to setrank "Sergeant"; ') The hint part I use just for debugging, somehow changing rank or trying to setleader doesnt seem to work. Probably bad syntax from my side, but clueless on whats wrong. Anyone ? Share this post Link to post Share on other sites
Tajin 348 Posted June 23, 2009 here you go: http://www.arma2.com/comref/full.html#GroupselectLeaderObject Share this post Link to post Share on other sites
Birkoff 0 Posted June 23, 2009 here you go:http://www.arma2.com/comref/full.html#GroupselectLeaderObject Thanks. Share this post Link to post Share on other sites
roman lynx 10 Posted June 23, 2009 hi, I would like to bring this back on topic. I would like to switch the leader to the guy I just switched too. I think it is the same as the OP asked. I understand that onTeamSwitch I have to run the command: "group _to selectLeader _to" but where do it put this? I would like to install that on my current single player campaign. I edited the save file with Laza editor and I see a node in the tree which says "OnTeamSwitch" with subnodes "data" and "type". Do you guys how do I place this command there? Thanks a lot! ---------- Post added at 10:19 PM ---------- Previous post was at 09:48 PM ---------- after some testing just found the answer: I added the following on the subnode "data": parameter: "value" value: "group _to selectLeader _to" and, on the subnode "type", I changed the value from "NOTHING" to "STRING" now whenever I switch to another team member he becomes the leader. Share this post Link to post Share on other sites