this trigger is supposed to replace the building after it dies. This trigger displays "yay" 4 times, meaning that it recognizes everything and works properly until it is told to create 1 (building) at AAPoint[blah]
Trigger:
- SAM site revival 2
- Events
- Unit - A unit Dies
- Conditions
- (Unit-type of (Triggering unit)) Equal to SAM Missile Launcher
- Actions
- Game - Display to (All players) the text: yay
- Set AAPoint[(Custom value of (Triggering unit))] = (Position of (Triggering unit))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (1 Mid <gen> contains AAPoint[(Custom value of (Triggering unit))]) Equal to True
- Then - Actions
- Game - Display to (All players) the text: yay
- Wait 30.00 seconds
- Game - Display to (All players) the text: yay
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- OwnerofBase[2] Equal to True
- Then - Actions
- Game - Display to (All players) the text: yay
- Unit - Create 1 SAM Missile Launcher for Player 1 (Red) at AAPoint[(Custom value of (Triggering unit))] facing Default building facing degrees
- Else - Actions
- Unit - Create 1 SAM Missile Launcher for Player 7 (Green) at AAPoint[(Custom value of (Triggering unit))] facing Default building facing degrees
- If - Conditions
- Else - Actions
- If - Conditions
- Events