I am trying to make a map with unit spawning you can turn on and off when you press buttons in a nexus. It works for the first tier of units, but when the unit is upgrading the spawn off stops working and on the stalker from zealot upgrade it still spawns zealots.
My code for the upgrading looks like this:
Events
Unit - Any Unit Enters a distance of 0.5 from Beacon (Protoss Large) [38.49, 16.91]
Local Variables
Conditions
Actions
General - If (Conditions) then do multiple (Actions)
If Then Else
General - Else if (Conditions) then do (Actions)
Else If
And
Conditions
(Owner of (Triggering unit)) == 1
(Player (Owner of (Triggering unit)) Minerals) >= 2000
Then
Player - Modify player 1 Minerals: Subtract 2000
Trigger - Turn Zealot P1 Off
Trigger - Turn Protoss units on Off
Trigger - Turn Protoss units on 6 On
And for on/ off
trigger on:
Events
UI - Player Any Player presses Start Spawn protoss
Local Variables
Conditions
Actions
General - If (Conditions) then do multiple (Actions)
If Then Else
General - Else if (Conditions) then do (Actions)
Else If
(Triggering player) == 1
Then
Trigger - Turn Stalker P1 On
Trigger off:
Events
UI - Player Any Player presses Start Spawn protoss
Local Variables
Conditions
Actions
General - If (Conditions) then do multiple (Actions)
If Then Else
General - Else if (Conditions) then do (Actions)
Else If
(Triggering player) == 1
Then
Trigger - Turn Stalker P1 On
If anyone can help I would be very thankful.
I am trying to make a map with unit spawning you can turn on and off when you press buttons in a nexus. It works for the first tier of units, but when the unit is upgrading the spawn off stops working and on the stalker from zealot upgrade it still spawns zealots.
My code for the upgrading looks like this:
Events
Unit - Any Unit Enters a distance of 0.5 from Beacon (Protoss Large) [38.49, 16.91]
Local Variables
Conditions
Actions
General - If (Conditions) then do multiple (Actions)
If Then Else
General - Else if (Conditions) then do (Actions)
Else If
And
Conditions
(Owner of (Triggering unit)) == 1
(Player (Owner of (Triggering unit)) Minerals) >= 2000
Then
Player - Modify player 1 Minerals: Subtract 2000
Trigger - Turn Zealot P1 Off
Trigger - Turn Protoss units on Off
Trigger - Turn Protoss units on 6 On
And for on/ off
trigger on:
Events
UI - Player Any Player presses Start Spawn protoss
Local Variables
Conditions
Actions
General - If (Conditions) then do multiple (Actions)
If Then Else
General - Else if (Conditions) then do (Actions)
Else If
(Triggering player) == 1
Then
Trigger - Turn Stalker P1 On
Trigger off:
Events
UI - Player Any Player presses Start Spawn protoss
Local Variables
Conditions
Actions
General - If (Conditions) then do multiple (Actions)
If Then Else
General - Else if (Conditions) then do (Actions)
Else If
(Triggering player) == 1
Then
Trigger - Turn Stalker P1 On
If anyone can help I would be very thankful.
Why don't you just change the event to "Player 1 presses start spawn protoss" will reduce your code a little.
Also I don't know if its a copy paste error, but in your "off" trigger you use "Trigger - Turn Stalker P1 On" shouldn't it be off?
Thanks, but problem number 2 still happens, the stalkers turn on/off, but the zealots still spawn.