Jump to content
Firebro113

Prevent Team Switch to Other Side

Recommended Posts

Normally, if units on the other side are marked as playable, you can switch to them after death, even though they aren't on the same side as you.

 

Is there any way to prevent this?

 

At least a way to distinguish them when choosing who to switch to?

 

"Just make them unplayable" isn't very helpful.

Share this post


Link to post
Share on other sites

Use setvariable in profilenamespace in initplayerlocal in which you set their original side.  Then check when a player changes between units if the side of the new unit is the same side as the original one. 

Share this post


Link to post
Share on other sites

What would then need to happen if not?

And that way would be checking after the player switches, is there a way to stop enemies from appearing in the team switch menu in the first place?

Share this post


Link to post
Share on other sites

Found solution but not really the best:

 

{ if(side _x != playerSide) then { removeSwitchableUnit _x } } forEach switchableUnits

 

Any errors in this?

 

And is there a better solution?

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

×