So I am making a game mode that is not unlike ASOIAF, Ocarina of Time, or Rise of the Witch King, and I'm trying to get the spawning system to function.
I have set up a countdown timer that goes off every 1 minute, and I want to create a trigger that spawns units at a certain point every time the countdown timer expires. Next to the point, there is a spawn building that represents ownership of the point, and I want the trigger to give these spawned units to the owner of the Spawn Building. This is a game mode where all the spawn buildings start off as a neutral building that players must destroy to capture, because of a trigger I have that works like this.
Conversion Trigger
Events
Unit -Any Unit dies
Local Variables
Conditions
(Owner of (Triggering unit)) == 15
((Triggering unit) is in Neutral Spawns Unit Group) == True
Actions
Unit -Create 1 (Unit type of (Triggering unit)) for player (Killing player) at (Position of (Triggering unit)) using default facing (No Options)
One of the problems that I have been running into is the fact that I cannot just set the value to "Owner of Building" because the building doesn't exist, because of the fact that when player captures this building, a new building is put into place, so creating this trigger and giving the units to the owner of the spawn building doesn't work because the spawn building is destroyed and a new one is put in its place. This is how I set up the trigger initially, shown below, and it doesn't work because of the fact that a new building is put into place. (Also, I don't want the trigger to spawn units if the spawn building is owned by the neutral, which is why the If-Then-else statement is there)
Vancouver Spawn
Events
Timer -Spawn Countdown Timer expires
Local Variables
Conditions
Actions
General -If (Conditions) then do (Actions) else do (Actions)
If
(Owner of Spawn - Vancouver (Starting Location) [26.50, 150.50]) == 15
Then
Else
Unit -Create 2 Zealot for player (Owner of Spawn - Vancouver (Starting Location) [26.50, 150.50]) at Vancouver Spawn Point using default facing (No Options)
Is there a way to check if this building type is owned by anyone in the game map. These spawn buildings are unique and only one of them exist at all in the game map, so I was hoping so that there was a way to make a condition check if there is just a single instance of the Spawn Building existing, and then giving the spawned units to the Owner of that Spawn Building.
Thank you in advance!
Rollback Post to RevisionRollBack
I also go by Krazymouse in SC2.
Past works: Cat and Mouse Winter Revival, Wrong Weapons Mod
To post a comment, please login or register a new account.
So I am making a game mode that is not unlike ASOIAF, Ocarina of Time, or Rise of the Witch King, and I'm trying to get the spawning system to function.
I have set up a countdown timer that goes off every 1 minute, and I want to create a trigger that spawns units at a certain point every time the countdown timer expires. Next to the point, there is a spawn building that represents ownership of the point, and I want the trigger to give these spawned units to the owner of the Spawn Building. This is a game mode where all the spawn buildings start off as a neutral building that players must destroy to capture, because of a trigger I have that works like this.
One of the problems that I have been running into is the fact that I cannot just set the value to "Owner of Building" because the building doesn't exist, because of the fact that when player captures this building, a new building is put into place, so creating this trigger and giving the units to the owner of the spawn building doesn't work because the spawn building is destroyed and a new one is put in its place. This is how I set up the trigger initially, shown below, and it doesn't work because of the fact that a new building is put into place. (Also, I don't want the trigger to spawn units if the spawn building is owned by the neutral, which is why the If-Then-else statement is there)
Is there a way to check if this building type is owned by anyone in the game map. These spawn buildings are unique and only one of them exist at all in the game map, so I was hoping so that there was a way to make a condition check if there is just a single instance of the Spawn Building existing, and then giving the spawned units to the Owner of that Spawn Building.
Thank you in advance!
I also go by Krazymouse in SC2.
Past works: Cat and Mouse Winter Revival, Wrong Weapons Mod