easyeb 137 Posted January 29, 2015 So I use team switching alot when I play (singleplayer, have no friends, bear with me). When I switch from beeing group leader to some other group or roll in the same group, the AI group leader (taking over the unit I was just playing) starts messing things up and order my group to board vehicles 10km away, removes my team organization and just acting random. My question is if there is any way to make him just shut up and stay still when I team switch? Thankful for any input. Cheers! Share this post Link to post Share on other sites
dreadpirate 173 Posted January 30, 2015 I'd look at: https://community.bistudio.com/wiki/onTeamSwitch Maybe you could promote yourself to leader when you switch..... Share this post Link to post Share on other sites
dreadpirate 173 Posted January 30, 2015 In your init.sqf: onTeamSwitch "group player selectLeader player"; Just tested. Seem to work ok. Share this post Link to post Share on other sites
easyeb 137 Posted January 30, 2015 Sweet, thanks! The real curveball though is when I switch to a unit in another group. ---------- Post added at 07:50 ---------- Previous post was at 06:36 ---------- After testing it I don't seem to get it to work though :( Must be doing something wrong. ---------- Post added at 08:31 ---------- Previous post was at 07:50 ---------- Got it working via trigger on act "onTeamSwitch {group player selectLeader player}" Share this post Link to post Share on other sites
easyeb 137 Posted February 7, 2015 Sill having a bit of problems with this. I got the onTeamSwitch working making me leader of the group when I change to a unit within the group, but when I change to a unit in another group, the group leader (previously me) starts issuing the weirdest orders (ordering some group members to board vehicles kilometers away and such). So when I get back to him the group is spread out on stupid assignments and mostly dead because of this. Share this post Link to post Share on other sites
dreadpirate 173 Posted February 7, 2015 Hmm, there doesn't seem to be an easy way to cancel AI orders to a group. Unless I'm missing something? Share this post Link to post Share on other sites
easyeb 137 Posted February 7, 2015 I'm not the right person to ask, but I agree. All I want him to do is be quiet for a couple of minutes :) Share this post Link to post Share on other sites
f2k sel 164 Posted February 7, 2015 Can't say I've ever experienced that problem of random orders. I tend to use the following placed in GL null=[] spawn {sleep 0.5;onTeamSwitch "selectPlayer (leader _from); {_x doFollow leader _from} foreach units _from; selectPlayer _to;"} If you want to always be the leader just remove the last section selectPlayer _to; then whatever unit you choose that will be leader. Share this post Link to post Share on other sites
dreadpirate 173 Posted February 7, 2015 The orders aren't random as such, the problem is with vehicles that the group has used being "assigned" to that group. So when you change groups the AI leader orders its units to board "their" vehicles (regardless of where they are on the map). The AI leader will also order its units to dismount from any vehicles they don't consider "theirs". Share this post Link to post Share on other sites