Hey, I'm working on a trigger for a custom map I am designing, but I have run into some trouble. As a newbie mapmaker, I'm not particularly good with triggers yet, and I've run out of ideas on why my current set is not working.
What I would like is for a player to ally with another player's team if their command structure is destroyed. However, right now even after destroying the command structure, the owner of the structure remains unallied with the opposing player's team. Here is the current list of actions, if anyone can give advice on how to improve it I would be very grateful.
Faction Change 1
Events
Unit - Any Unit dies
Local Variables
Conditions
(Unit type of (Triggering unit)) == Command Center
Actions
Player Group - Pick each player in (All players) and do (Actions)
Actions
Player - Make player (Owner of (Triggering unit)) and player (Picked player) treat each other as Enemy
Player Group - Pick each player in (Allies of player (Killing player)) and do (Actions)
Actions
Player - Make player (Owner of (Triggering unit)) and player (Picked player) treat each other as Ally With Shared Vision
Unit - Create 1 Command Center for player (Owner of (Triggering unit)) at (Position of (Triggering unit)) using default facing (No Options)
What is ideally going to happen is that the player who loses their command center first unallies everyone on the map (so as to discredit previous alliances) and then allies themself with the team of the player who killed him. While I initially suspected Terran Burnout, the glitch persisted even after I removed the damage component from it.
EDIT: I think I found my issue. When the allegiance of the defeated player changes, he allies all players on the same team as his killer, but not the killer himself.
EDIT Again: No, nevermind. My current testing situation is like this.
Player1 (Me) allied with Player 3 (nobody) vs Player 2 (nobody)
When I destroy Player2's structure, it simply reappears. But when Player3 Destroys the structure, we all become allied.
Hey, I'm working on a trigger for a custom map I am designing, but I have run into some trouble. As a newbie mapmaker, I'm not particularly good with triggers yet, and I've run out of ideas on why my current set is not working.
What I would like is for a player to ally with another player's team if their command structure is destroyed. However, right now even after destroying the command structure, the owner of the structure remains unallied with the opposing player's team. Here is the current list of actions, if anyone can give advice on how to improve it I would be very grateful.
Faction Change 1
Events
Unit - Any Unit dies
Local Variables
Conditions
(Unit type of (Triggering unit)) == Command Center
Actions
Player Group - Pick each player in (All players) and do (Actions)
Actions
Player - Make player (Owner of (Triggering unit)) and player (Picked player) treat each other as Enemy
Player Group - Pick each player in (Allies of player (Killing player)) and do (Actions)
Actions
Player - Make player (Owner of (Triggering unit)) and player (Picked player) treat each other as Ally With Shared Vision
Unit - Create 1 Command Center for player (Owner of (Triggering unit)) at (Position of (Triggering unit)) using default facing (No Options)
@Trieva: Go
What is ideally going to happen is that the player who loses their command center first unallies everyone on the map (so as to discredit previous alliances) and then allies themself with the team of the player who killed him. While I initially suspected Terran Burnout, the glitch persisted even after I removed the damage component from it.
EDIT: I think I found my issue. When the allegiance of the defeated player changes, he allies all players on the same team as his killer, but not the killer himself.
EDIT Again: No, nevermind. My current testing situation is like this.
Player1 (Me) allied with Player 3 (nobody) vs Player 2 (nobody)
When I destroy Player2's structure, it simply reappears. But when Player3 Destroys the structure, we all become allied.
Is there anyone that can help? This is the single most important part of my game, and I don't know whats wrong with it!
Is the command center dying in exactly the same way between when you kill it and when player 3 kills it?
I ask this because there may be a different effect causing the damage which does not attribute the kill to a unit you own.
@AetrisSC2: Go
take a screen shot of the actual trigger...