Jump to content
Sign in to follow this  
easyeb

Team switching and AI gets dilusions of grandure

Recommended Posts

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

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

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

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

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

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×