I'm trying to create a trigger that instantly replaces a building built inside a certain region with a unit. Example being a Command Center turning into SCV. The first trigger I used was this:
Events
Unit - Any Unit Enters Arena
Condition
(Unit type of (Triggering unit)) == Command Center
Actions
Region - Move Spawn to (Position of (Triggering unit))
Unit - Remove (Triggering unit) from the game
Unit - Create 1 SCV for player (Triggering player) at (Center of Spawn) using default facing (No Options)
But that replaces the Command Center the moment it is done building, and I need build time to be included. Any suggestions on cleaning up my trigger, or how to make it work?
Do a construction complete event, then have it check if the construction is in the region, and then run.
Just a note, that when completing construction, the unit is referred to as a "triggering progress unit" rather than a "triggering unit".
Unless you mean you want the CC to be replaced by the SCV it produces...
What exactly are you trying to do? Are you trying to make it so that when the CC is done building, it becomes an SCV? or that when the SCV is done building, it replaces the command center? Or something else?
I'm trying to create a trigger that instantly replaces a building built inside a certain region with a unit. Example being a Command Center turning into SCV. The first trigger I used was this:
Events
Unit - Any Unit Enters Arena
Condition
(Unit type of (Triggering unit)) == Command Center
Actions
Region - Move Spawn to (Position of (Triggering unit))
Unit - Remove (Triggering unit) from the game
Unit - Create 1 SCV for player (Triggering player) at (Center of Spawn) using default facing (No Options)
But that replaces the Command Center the moment it is done building, and I need build time to be included. Any suggestions on cleaning up my trigger, or how to make it work?
@corwin323: Go
Do a construction complete event, then have it check if the construction is in the region, and then run.
Just a note, that when completing construction, the unit is referred to as a "triggering progress unit" rather than a "triggering unit".
Unless you mean you want the CC to be replaced by the SCV it produces... What exactly are you trying to do? Are you trying to make it so that when the CC is done building, it becomes an SCV? or that when the SCV is done building, it replaces the command center? Or something else?
Or did my original suggestion fix it?
Yes! It did help me! Thank you very much.
I'm replacing the completed CC with an SCV. I'm remaking a Starcraft I UMS, called Engineererz to try to learn the Galaxy Editor.
I used:
Events
Unit - Any Unit construction is Completed
Conditions
(Unit type of (Triggering progress unit)) == Command Center
Actions
Region - Move Spawn to (Position of (Triggering progress unit))
Unit - Remove (Triggering progress unit) from the game
Unit - Create 1 SCV for player (Triggering player) at (Center of Spawn) using default facing (No Options)