Hey, could you guys have a look at this trigger, let me know where I've gone wrong.
Basically, I had it working with, unit casts ability on beacon = spawn Spire at beacon. And if a building is already there, kill it, then create one for yourself (so like a take and hold kind of thing)...
But decided, that instead of instantly killing the enemies spire and replacing with one of your own, it should if there is a spire there, damage the spire (so attempt to kill it), else if no spire, spawn your own. I'm not sure where this has gone wrong.
Events
Unit - Any Unit uses Zeratul - Void Prison Copy at Generic6 - Complete stage (Ignore shared abilities)
Local Variables
Conditions
(Distance between (Position of (Triggering unit)) and (Position of (Triggering ability target unit))) <= 3.0
(Owner of (Triggering ability target unit)) != (Owner of (Triggering unit))
(Unit type of (Triggering ability target unit)) == Beacon (Zerg Large)
Actions
Region - Move Find Spire to (Position of (Triggering ability target unit))
Unit Group - Pick each unit in (Any units in Find Spire owned by player Any Player matching Required: Biological, Structure; Excluded: Missile, Dead, Hidden, Invulnerable, with at most 1) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Picked unit)) == Spire
Then
Environment - Deal damage using Karass - Psi Discharge (Launch Missile) on (Picked unit) from (Triggering unit) with 5.0 extra damage
Else
Unit - Change ownership of (Triggering ability target unit) to player (Owner of (Triggering unit)) and Retain Color
Unit - Create 1 Spire for player (Owner of (Triggering unit)) at (Position of (Triggering ability target unit)) using default facing (Ignore Placement)
Variable - Modify Spire Count[(Owner of (Triggering unit))]: + 1
Couple of things; conditions may need to be all combined under an "and" to force to make sure all three are rquired otherwise use "or". You do not need to save or move a region with an action as your pick each units condition can check a region made from circle around are target unit. Also your else cause it to deal damage and then change ownership of it right after. If you have it setup that was it will either kill the target unit and the next action won't register because you just destroyed it or you damage basically your own unit.
I've found how to create circle area from ability target unit.
I'm a little confused by what you mention next though, as I want this trigger to either:
A). If Spire on beacon, then damage that Spire.
B). Otherwise, if no Spire on beacon, then spawn one for yourself, and change the ownership of the beacon to yourself.
If the trigger kills the Spire that was already on the beacon, I don't want it to continue on and spawn one for yourself, but make you have to use the ability again to spawn one.
Trigger currently looks like this:
Events
Unit - Any Unit uses Zeratul - Void Prison Copy at Generic6 - Complete stage (Ignore shared abilities)
Local Variables
Conditions
And
Conditions
(Distance between (Position of (Triggering unit)) and (Position of (Triggering ability target unit))) <= 3.0
(Owner of (Triggering ability target unit)) != (Owner of (Triggering unit))
(Unit type of (Triggering ability target unit)) == Beacon (Zerg Large)
Actions
Unit Group - Pick each unit in (Any units in (Region((Triggering ability target point), 1.0)) owned by player Any Player matching Required: Biological, Structure; Excluded: Missile, Dead, Hidden, Invulnerable, with at most 1) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Picked unit)) == Spire
Then
Environment - Deal damage using Karass - Psi Discharge (Launch Missile) on (Picked unit) from (Triggering unit) with 5.0 extra damage
Else
Unit - Change ownership of (Triggering ability target unit) to player (Owner of (Triggering unit)) and Retain Color
Unit - Create 1 Spire for player (Owner of (Triggering unit)) at (Position of (Triggering ability target unit)) using default facing (Ignore Placement)
Variable - Modify Spire Count[(Owner of (Triggering unit))]: + 1
I've added a text tag to say 'THEN' if firing the then command and one on 'ELSE'.
When Spire on beacon; 'Then' fires... but does not attack the spire.
When no Spire on beacon; 'Else' does not fire.
Any ideas?
I was thinking it might have to do with the "Unit Group - Pick each unit in (Any units in (Region((Triggering ability target point), 1.0)) owned by player Any Player matching Required: Biological, Structure; Excluded: Missile, Dead, Hidden, Invulnerable, with at most 1) and do (Actions)" section?
I also, tried expanding the target point to 3.0 just in case, but this didn't resolve it either.
Events
Unit - Any Unit uses Zeratul - Void Prison Copy at Generic6 - Complete stage (Ignore shared abilities)
Local Variables
Conditions
And
Conditions
(Distance between (Position of (Triggering unit)) and (Position of (Triggering ability target unit))) <= 3.0
(Owner of (Triggering ability target unit)) != (Owner of (Triggering unit))
(Unit type of (Triggering ability target unit)) == Beacon (Zerg Large)
Actions
Unit Group - Pick each unit in (SPIRE units in (Region((Triggering ability target point), 3.0)) owned by player Any Player matching Required: Biological, Structure; Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any Amount) and do (Actions)
Actions
Unit Group - Add (Picked unit) to SPIRES
General - If (Conditions) then do (Actions) else do (Actions)
If
(Number of Living units in SPIRES) == 1
Then
Text Tag - Create a text tag with the text "THEN" for (All players), using a font size of 24, at (Position of (Triggering unit)) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Animation - Play Attack animation for (Actor for (Triggering unit)) as Default, using Full Match options and Default Time blend time
Environment - Deal damage using Zeratul - Master Psi Blades on (Unit 1 from SPIRES) from (Triggering unit) with 0.0 extra damage
General - Wait 2.0 Game Time seconds
Text Tag - Destroy (Last created text tag)
Unit Group - Remove (Picked unit) from SPIRES
Else
Text Tag - Create a text tag with the text "ELSE" for (All players), using a font size of 24, at (Position of (Triggering unit)) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Unit - Change ownership of (Triggering ability target unit) to player (Owner of (Triggering unit)) and Retain Color
Unit - Create 1 Spire for player (Owner of (Triggering unit)) at (Position of (Triggering ability target unit)) using default facing (Ignore Placement)
Variable - Modify Spire Count[(Owner of (Triggering unit))]: + 1
General - Wait 2.0 Game Time seconds
Text Tag - Destroy (Last created text tag)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey, could you guys have a look at this trigger, let me know where I've gone wrong.
Basically, I had it working with, unit casts ability on beacon = spawn Spire at beacon. And if a building is already there, kill it, then create one for yourself (so like a take and hold kind of thing)...
But decided, that instead of instantly killing the enemies spire and replacing with one of your own, it should if there is a spire there, damage the spire (so attempt to kill it), else if no spire, spawn your own. I'm not sure where this has gone wrong.
Events
Unit - Any Unit uses Zeratul - Void Prison Copy at Generic6 - Complete stage (Ignore shared abilities)
Local Variables
Conditions
(Distance between (Position of (Triggering unit)) and (Position of (Triggering ability target unit))) <= 3.0
(Owner of (Triggering ability target unit)) != (Owner of (Triggering unit))
(Unit type of (Triggering ability target unit)) == Beacon (Zerg Large)
Actions
Region - Move Find Spire to (Position of (Triggering ability target unit))
Unit Group - Pick each unit in (Any units in Find Spire owned by player Any Player matching Required: Biological, Structure; Excluded: Missile, Dead, Hidden, Invulnerable, with at most 1) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Picked unit)) == Spire
Then
Environment - Deal damage using Karass - Psi Discharge (Launch Missile) on (Picked unit) from (Triggering unit) with 5.0 extra damage
Else
Unit - Change ownership of (Triggering ability target unit) to player (Owner of (Triggering unit)) and Retain Color
Unit - Create 1 Spire for player (Owner of (Triggering unit)) at (Position of (Triggering ability target unit)) using default facing (Ignore Placement)
Variable - Modify Spire Count[(Owner of (Triggering unit))]: + 1
Couple of things; conditions may need to be all combined under an "and" to force to make sure all three are rquired otherwise use "or". You do not need to save or move a region with an action as your pick each units condition can check a region made from circle around are target unit. Also your else cause it to deal damage and then change ownership of it right after. If you have it setup that was it will either kill the target unit and the next action won't register because you just destroyed it or you damage basically your own unit.
Ah, thank You.
I've found how to create circle area from ability target unit.
I'm a little confused by what you mention next though, as I want this trigger to either:
A). If Spire on beacon, then damage that Spire.
B). Otherwise, if no Spire on beacon, then spawn one for yourself, and change the ownership of the beacon to yourself.
If the trigger kills the Spire that was already on the beacon, I don't want it to continue on and spawn one for yourself, but make you have to use the ability again to spawn one.
Trigger currently looks like this:
Events
Unit - Any Unit uses Zeratul - Void Prison Copy at Generic6 - Complete stage (Ignore shared abilities)
Local Variables
Conditions
And
Conditions
(Distance between (Position of (Triggering unit)) and (Position of (Triggering ability target unit))) <= 3.0
(Owner of (Triggering ability target unit)) != (Owner of (Triggering unit))
(Unit type of (Triggering ability target unit)) == Beacon (Zerg Large)
Actions
Unit Group - Pick each unit in (Any units in (Region((Triggering ability target point), 1.0)) owned by player Any Player matching Required: Biological, Structure; Excluded: Missile, Dead, Hidden, Invulnerable, with at most 1) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Picked unit)) == Spire
Then
Environment - Deal damage using Karass - Psi Discharge (Launch Missile) on (Picked unit) from (Triggering unit) with 5.0 extra damage
Else
Unit - Change ownership of (Triggering ability target unit) to player (Owner of (Triggering unit)) and Retain Color
Unit - Create 1 Spire for player (Owner of (Triggering unit)) at (Position of (Triggering ability target unit)) using default facing (Ignore Placement)
Variable - Modify Spire Count[(Owner of (Triggering unit))]: + 1
I think "and" is default behavior (if no logic nodes and/or added).
I've added a text tag to say 'THEN' if firing the then command and one on 'ELSE'.
When Spire on beacon; 'Then' fires... but does not attack the spire.
When no Spire on beacon; 'Else' does not fire.
Any ideas?
I was thinking it might have to do with the "Unit Group - Pick each unit in (Any units in (Region((Triggering ability target point), 1.0)) owned by player Any Player matching Required: Biological, Structure; Excluded: Missile, Dead, Hidden, Invulnerable, with at most 1) and do (Actions)" section?
I also, tried expanding the target point to 3.0 just in case, but this didn't resolve it either.
Any help, much appreciated.
Thanks.
Okay,
I've managed to fix the spire being damaged. The spire will now be damaged until dead.
But still haven't got Else to fire?
Thanks.
Hey Guys, Resolved by the following:
Events
Unit - Any Unit uses Zeratul - Void Prison Copy at Generic6 - Complete stage (Ignore shared abilities)
Local Variables
Conditions
And
Conditions
(Distance between (Position of (Triggering unit)) and (Position of (Triggering ability target unit))) <= 3.0
(Owner of (Triggering ability target unit)) != (Owner of (Triggering unit))
(Unit type of (Triggering ability target unit)) == Beacon (Zerg Large)
Actions
Unit Group - Pick each unit in (SPIRE units in (Region((Triggering ability target point), 3.0)) owned by player Any Player matching Required: Biological, Structure; Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any Amount) and do (Actions)
Actions
Unit Group - Add (Picked unit) to SPIRES
General - If (Conditions) then do (Actions) else do (Actions)
If
(Number of Living units in SPIRES) == 1
Then
Text Tag - Create a text tag with the text "THEN" for (All players), using a font size of 24, at (Position of (Triggering unit)) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Animation - Play Attack animation for (Actor for (Triggering unit)) as Default, using Full Match options and Default Time blend time
Environment - Deal damage using Zeratul - Master Psi Blades on (Unit 1 from SPIRES) from (Triggering unit) with 0.0 extra damage
General - Wait 2.0 Game Time seconds
Text Tag - Destroy (Last created text tag)
Unit Group - Remove (Picked unit) from SPIRES
Else
Text Tag - Create a text tag with the text "ELSE" for (All players), using a font size of 24, at (Position of (Triggering unit)) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Unit - Change ownership of (Triggering ability target unit) to player (Owner of (Triggering unit)) and Retain Color
Unit - Create 1 Spire for player (Owner of (Triggering unit)) at (Position of (Triggering ability target unit)) using default facing (Ignore Placement)
Variable - Modify Spire Count[(Owner of (Triggering unit))]: + 1
General - Wait 2.0 Game Time seconds
Text Tag - Destroy (Last created text tag)