Changing a players team?

Zerox

Ultra Cool Member
Reaction score
28
Hello everyone. I just have 1 last trigger to work out before I can publish my map and that is this.

When Unit X of player 1 dies player one changes to ally with shared vision for team 2 from team 1.

Basically I need to find some way to completely change the team of the player so both the previous allies treat that player as an enemy and the used to be enemy is then the ally.

Can anyone help me? I'll give +rep to those who try to help.
 

Grags_1977

Ultra Cool Member
Reaction score
32
Trigger:
  • Blah
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
    • Actions
      • Unit - Create 1 (Unit-type of (Dying unit)) for Player 2 (Blue) at (Position of (Dying unit)) facing Default building facing degrees


This?
 

Zerox

Ultra Cool Member
Reaction score
28
Not quit but I appreciate the try. I essentially need to have a unit created for the same player when (variable Unit) dies of that same player. But then they have to switch to the other team. Its not really the creation of a new unit that I'm concerned about but the team switching.
 

Grags_1977

Ultra Cool Member
Reaction score
32
Yea I thought it seemed too basic. I'm not really sure what your after. sorry for wasting your time :(
 

Zerox

Ultra Cool Member
Reaction score
28
Oh its no worry. I was glad to see someone tried to help still. I guess I'm asking for something pretty hard. XD

Edit: I guess what I need is something like in Vamprisim Fire. When the player's builder dies they lose all their units and then they switch to the vampire team as a vampire. Any idea how that works?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Something like this maybe :S
Trigger:
  • Change Team
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Player - Make Player 1 (Red) treat Player 2 (Blue) as an Ally with shared vision
      • Player - Make Player 1 (Red) treat Player 3 (Teal) as an Enemy


You just need to cope those ally/enemy actions so that player (red) becomes enemy with all in it's last team, and ally with those in it's new team :D
 

Zerox

Ultra Cool Member
Reaction score
28
Thats basically what I got right now. Works great for the first player to have it happen to but then it sets that player who's already changed + to an enemy as well for a player who dies and changes later.

This is my actual trigger for Player 1.
Trigger:
  • Mario Dies
    • Events
      • Unit - |c00FF0000Mario|r 0017 <gen> Dies
    • Conditions
    • Actions
      • Unit Group - Remove |c00FF0000Mario|r 0017 <gen> from MarioCharactersUnits
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Unit - Create 1 Unwilling Boo for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Player - Make Player 1 (Red) treat Player 2 (Blue) as an Enemy
      • Player - Make Player 1 (Red) treat Player 3 (Teal) as an Enemy
      • Player - Make Player 1 (Red) treat Player 4 (Purple) as an Enemy
      • Player - Make Player 1 (Red) treat Player 5 (Yellow) as an Enemy
      • Player - Make Player 1 (Red) treat Player 6 (Orange) as an Enemy
      • Player - Make Player 1 (Red) treat Player 7 (Green) as an Enemy
      • Player - Make Player 1 (Red) treat Player 12 (Brown) as an Ally with shared vision
      • Player - Make Player 12 (Brown) treat Player 1 (Red) as an Ally with shared vision
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top