• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Share control of units

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
I have 9 players in my map. when event occours i split them into 2 random groups that have no vision but are neutral towards each other. players from group a cant see units of players from group and opposite. the groups are 4 players and 5 players or 5 players and 4 players it depends how it was randomized. if there is leaver in gorup A then only players from group A should get full control share of his units. same thing for group b. only team to which leaver belongs should be able to control his units after he left.





this is how i implemented it to triggers, but the issue is players from team A can control leavers from team B, players from team B can control leavers from team A, blizzard's function to give control to all players's allies treats neutrals players as allied and this is most probelamtic for me. how can i solve this in other way?
 
Level 13
Joined
Oct 18, 2013
Messages
691
blizzard's function to give control to all players's allies treats neutrals players as allied and this is most probelamtic for me.
You could make Neutral Players enemies to everyone before running this!

As for your main issue, the "Game - Grant Shared Control" is happening when players from A are still allied to B. You could resolve this by first making team A neutral with all of the teammates from team B.
  • Player - Make (Picked player) treat OtherTeamPlayer as an Neutral
Good debugging exercise for you could be adding waits and debug messages to confirm that it is THIS block of code that is granting shared control.


edit: I believe you might have to do this for both teams before running the script you linked, iirc the Player function is oneway instead of applying to both players.
 
Status
Not open for further replies.
Top