- Joined
- Sep 9, 2012
- Messages
- 172
Creates five element energies around him.The elements are Fire,Wind,Earth,Water,Poison.Any enemy who come in 300 range of him.The enemy will be hit with one of the energies (random).
The Triggers
The Problem is that all the energy balls do not go and explode.
Everytime 1 ball is left in its position.
I want all of the balls to hit to random enemies.
I'm wondering what is wrong with my Triggers.
I suggest to download the spell in the attachment to view it.
The Triggers
-
Elemental Start
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Elemental Energies
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Index_Listener Equal to 0
-
Then - Actions
- Trigger - Turn on Elemental Loop <gen>
- Trigger - Turn on Elemental Earth Go <gen>
- Trigger - Turn on Elemental Fire Go <gen>
- Trigger - Turn on Elemental Poison Go <gen>
- Trigger - Turn on Elemental Water Go <gen>
- Trigger - Turn on Elemental Dark Go <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Recycle_Size Greater than 0
-
Then - Actions
- Set Energy_Recycle_Size = (Energy_Recycle_Size - 1)
- Set Energy_Current_Index = Energy_Recycle_Container[Energy_Recycle_Size]
-
Else - Actions
- Set Energy_Current_Index = Energy_Index_Size
- Set Energy_Index_Size = (Energy_Index_Size + 1)
-
If - Conditions
- Set Energy_Caster[Energy_Current_Index] = (Triggering unit)
- Set Energy_Caster_Position[Energy_Current_Index] = (Position of Energy_Caster[Energy_Current_Index])
- Set Energy_Spawn_1[Energy_Current_Index] = (Energy_Caster_Position[Energy_Current_Index] offset by Energy_Spawn_Distance_1 towards ((Facing of Energy_Caster[Energy_Current_Index]) + Energy_Spawn_Angle_1) degrees)
- Set Energy_Spawn_2[Energy_Current_Index] = (Energy_Caster_Position[Energy_Current_Index] offset by Energy_Spawn_Distance_2 towards ((Facing of Energy_Caster[Energy_Current_Index]) + Energy_Spawn_Angle_2) degrees)
- Set Energy_Spawn_3[Energy_Current_Index] = (Energy_Caster_Position[Energy_Current_Index] offset by Energy_Spawn_Distance_3 towards ((Facing of Energy_Caster[Energy_Current_Index]) + Energy_Spawn_Angle_3) degrees)
- Set Energy_Spawn_4[Energy_Current_Index] = (Energy_Caster_Position[Energy_Current_Index] offset by Energy_Spawn_Distance_4 towards ((Facing of Energy_Caster[Energy_Current_Index]) + Energy_Spawn_Angle_4) degrees)
- Set Energy_Spawn_5[Energy_Current_Index] = (Energy_Caster_Position[Energy_Current_Index] offset by Energy_Spawn_Distance_5 towards ((Facing of Energy_Caster[Energy_Current_Index]) + Energy_Spawn_Angle_5) degrees)
- Unit - Create 1 Energy_Earth for Player 7 (Green) at Energy_Spawn_1[Energy_Current_Index] facing Energy_Spawn_Angle_1 degrees
- Set Energy_Earth[Energy_Current_Index] = (Last created unit)
- Animation - Change Energy_Earth[Energy_Current_Index]'s vertex coloring to (0.00%, 100.00%, 0.00%) with 0.00% transparency
- Unit - Create 1 Energy_Fire for Player 1 (Red) at Energy_Spawn_2[Energy_Current_Index] facing Energy_Spawn_Angle_2 degrees
- Set Energy_Fire[Energy_Current_Index] = (Last created unit)
- Animation - Change Energy_Fire[Energy_Current_Index]'s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
- Unit - Create 1 Energy_Poison for Player 4 (Purple) at Energy_Spawn_3[Energy_Current_Index] facing Energy_Spawn_Angle_3 degrees
- Set Energy_Poison[Energy_Current_Index] = (Last created unit)
- Animation - Change Energy_Poison[Energy_Current_Index]'s vertex coloring to (100.00%, 0.00%, 100.00%) with 0.00% transparency
- Unit - Create 1 Energy_Water for Player 10 (Light Blue) at Energy_Spawn_4[Energy_Current_Index] facing Energy_Spawn_Angle_4 degrees
- Set Energy_Water[Energy_Current_Index] = (Last created unit)
- Animation - Change Energy_Water[Energy_Current_Index]'s vertex coloring to (0.00%, 0.00%, 100.00%) with 0.00% transparency
- Unit - Create 1 Energy_Wind for Neutral Hostile at Energy_Spawn_5[Energy_Current_Index] facing Energy_Spawn_Angle_5 degrees
- Set Energy_Dark[Energy_Current_Index] = (Last created unit)
- Animation - Change Energy_Dark[Energy_Current_Index]'s vertex coloring to (0.00%, 0.00%, 0.00%) with 0.00% transparency
- Set Energy_Index_Container[Energy_Index_Listener] = Energy_Current_Index
- Set Energy_Index_Listener = (Energy_Index_Listener + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Elemental Earth Go
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set Energy_Group[Energy_Current_Index] = (Random 1 units from (Units within 300.00 of Energy_Caster_Position[Energy_Current_Index] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit) belongs to an enemy of
- Set Energy_Caster_Position[Energy_Current_Index] = (Position of Energy_Caster[Energy_Current_Index])
- Set Energy_Earth_Position[Energy_Current_Index] = (Position of Energy_Earth[Energy_Current_Index])
- Set Energy_Move_1[Energy_Current_Index] = (Energy_Caster_Position[Energy_Current_Index] offset by Energy_Spin_Distance_1 towards ((Facing of Energy_Caster[Energy_Current_Index]) + (Energy_Spawn_Angle_1 + Energy_Spin_Speed_1)) degrees)
- Unit - Move Energy_Earth[Energy_Current_Index] instantly to Energy_Move_1[Energy_Current_Index]
-
Events
-
Elemental Fire Go
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set Energy_Group[Energy_Current_Index] = (Random 1 units from (Units within 300.00 of Energy_Caster_Position[Energy_Current_Index] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit) belongs to an enemy of
- Set Energy_Caster_Position[Energy_Current_Index] = (Position of Energy_Caster[Energy_Current_Index])
- Set Energy_Fire_Position[Energy_Current_Index] = (Position of Energy_Fire[Energy_Current_Index])
- Set Energy_Move_2[Energy_Current_Index] = (Energy_Caster_Position[Energy_Current_Index] offset by Energy_Spin_Distance_2 towards ((Facing of Energy_Caster[Energy_Current_Index]) + (Energy_Spawn_Angle_2 + Energy_Spin_Speed_2)) degrees)
- Unit - Move Energy_Fire[Energy_Current_Index] instantly to Energy_Move_2[Energy_Current_Index]
-
Events
-
Elemental Poison Go
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set Energy_Group[Energy_Current_Index] = (Random 1 units from (Units within 300.00 of Energy_Caster_Position[Energy_Current_Index] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit) belongs to an enemy of
- Set Energy_Caster_Position[Energy_Current_Index] = (Position of Energy_Caster[Energy_Current_Index])
- Set Energy_Poison_Position[Energy_Current_Index] = (Position of Energy_Poison[Energy_Current_Index])
- Set Energy_Move_3[Energy_Current_Index] = (Energy_Caster_Position[Energy_Current_Index] offset by Energy_Spin_Distance_3 towards ((Facing of Energy_Caster[Energy_Current_Index]) + (Energy_Spawn_Angle_3 + Energy_Spin_Speed_3)) degrees)
- Unit - Move Energy_Poison[Energy_Current_Index] instantly to Energy_Move_3[Energy_Current_Index]
-
Events
-
Elemental Water Go
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set Energy_Group[Energy_Current_Index] = (Random 1 units from (Units within 300.00 of Energy_Caster_Position[Energy_Current_Index] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit) belongs to an enemy of
- Set Energy_Caster_Position[Energy_Current_Index] = (Position of Energy_Caster[Energy_Current_Index])
- Set Energy_Water_Position[Energy_Current_Index] = (Position of Energy_Water[Energy_Current_Index])
- Set Energy_Move_4[Energy_Current_Index] = (Energy_Caster_Position[Energy_Current_Index] offset by Energy_Spin_Distance_4 towards ((Facing of Energy_Caster[Energy_Current_Index]) + (Energy_Spawn_Angle_4 + Energy_Spin_Speed_4)) degrees)
- Unit - Move Energy_Water[Energy_Current_Index] instantly to Energy_Move_4[Energy_Current_Index]
-
Events
-
Elemental Dark Go
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set Energy_Group[Energy_Current_Index] = (Random 1 units from (Units within 300.00 of Energy_Caster_Position[Energy_Current_Index] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit) belongs to an enemy of
- Set Energy_Caster_Position[Energy_Current_Index] = (Position of Energy_Caster[Energy_Current_Index])
- Set Energy_Move_5[Energy_Current_Index] = (Energy_Caster_Position[Energy_Current_Index] offset by Energy_Spin_Distance_5 towards ((Facing of Energy_Caster[Energy_Current_Index]) + (Energy_Spawn_Angle_5 + Energy_Spin_Speed_5)) degrees)
- Set Energy_Dark_Position[Energy_Current_Index] = (Position of Energy_Dark[Energy_Current_Index])
- Unit - Move Energy_Dark[Energy_Current_Index] instantly to Energy_Move_5[Energy_Current_Index]
-
Events
-
Elemental Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer Energy_Loop) from 0 to (Energy_Index_Listener - 1), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Energy_Earth[Energy_Current_Index] is alive) Equal to True
- (Energy_Dark[Energy_Current_Index] is alive) Equal to True
- (Energy_Fire[Energy_Current_Index] is alive) Equal to True
- (Energy_Poison[Energy_Current_Index] is alive) Equal to True
- (Energy_Water[Energy_Current_Index] is alive) Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set Energy_Current_Index = Energy_Index_Container[Energy_Loop]
- Set Energy_Caster_Position[Energy_Current_Index] = (Position of Energy_Caster[Energy_Current_Index])
- Set Energy_Group[Energy_Current_Index] = (Random 1 units from (Units within 300.00 of Energy_Caster_Position[Energy_Current_Index] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit) belongs to an enemy of
- Set Energy[1] = Energy_Earth[Energy_Current_Index]
- Set Energy[2] = Energy_Fire[Energy_Current_Index]
- Set Energy[3] = Energy_Poison[Energy_Current_Index]
- Set Energy[4] = Energy_Water[Energy_Current_Index]
- Set Energy[5] = Energy_Dark[Energy_Current_Index]
-
Unit Group - Pick every unit in Energy_Group[Energy_Current_Index] and do (Actions)
-
Loop - Actions
- Set Energy_Picked_Unit[Energy_Current_Index] = (Picked unit)
- Set Energy_Random[Energy_Current_Index] = Energy[(Random integer number between 1 and 5)]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Random[Energy_Current_Index] Equal to Energy[1]
-
Then - Actions
- Trigger - Turn on Elemental Random Go <gen>
- Trigger - Turn off Elemental Loop <gen>
- Trigger - Turn off Elemental Earth Go <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Random[Energy_Current_Index] Equal to Energy[2]
-
Then - Actions
- Trigger - Turn on Elemental Random Go <gen>
- Trigger - Turn off Elemental Loop <gen>
- Trigger - Turn off Elemental Fire Go <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Random[Energy_Current_Index] Equal to Energy[3]
-
Then - Actions
- Trigger - Turn on Elemental Random Go <gen>
- Trigger - Turn off Elemental Loop <gen>
- Trigger - Turn off Elemental Poison Go <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Random[Energy_Current_Index] Equal to Energy[4]
-
Then - Actions
- Trigger - Turn on Elemental Random Go <gen>
- Trigger - Turn off Elemental Loop <gen>
- Trigger - Turn off Elemental Water Go <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Random[Energy_Current_Index] Equal to Energy[5]
-
Then - Actions
- Trigger - Turn on Elemental Random Go <gen>
- Trigger - Turn off Elemental Loop <gen>
- Trigger - Turn off Elemental Dark Go <gen>
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Else - Actions
- Set Energy_Index_Listener = (Energy_Index_Listener - 1)
- Set Energy_Index_Container[Energy_Loop] = Energy_Index_Container[Energy_Index_Listener]
- Set Energy_Recycle_Container[Energy_Recycle_Size] = Energy_Current_Index
- Set Energy_Recycle_Size = (Energy_Recycle_Size + 1)
- Set Energy_Loop = (Energy_Loop - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Index_Listener Equal to 0
-
Then - Actions
- Trigger - Turn off Elemental Loop <gen>
- Trigger - Turn off Elemental Earth Go <gen>
- Trigger - Turn off Elemental Fire Go <gen>
- Trigger - Turn off Elemental Poison Go <gen>
- Trigger - Turn off Elemental Water Go <gen>
- Trigger - Turn off Elemental Dark Go <gen>
- Skip remaining actions
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer Energy_Loop) from 0 to (Energy_Index_Listener - 1), do (Actions)
-
Events
-
Elemental Random Go
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set Energy_Group[Energy_Current_Index] = (Random 1 units from (Units within 300.00 of Energy_Caster_Position[Energy_Current_Index] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit) belongs to an enemy of
- Set Energy_Picked_Position[Energy_Current_Index] = (Position of Energy_Picked_Unit[Energy_Current_Index])
- Set Energy_Random_Position[Energy_Current_Index] = (Position of Energy_Random[Energy_Current_Index])
- Set Energy_Hit_Move[Energy_Current_Index] = (Energy_Random_Position[Energy_Current_Index] offset by 10.00 towards (Angle from Energy_Random_Position[Energy_Current_Index] to Energy_Picked_Position[Energy_Current_Index]) degrees)
- Unit - Move Energy_Random[Energy_Current_Index] instantly to Energy_Hit_Move[Energy_Current_Index]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Random[Energy_Current_Index] Equal to Energy[1]
-
Then - Actions
- Set Energy_Earth_Group[Energy_Current_Index] = (Units within 300.00 of Energy_Caster_Position[Energy_Current_Index] matching (((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) is A structure) Not equal to True)) and ((((Matching unit) is alive) Equal to True) and (((Matching uni
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between Energy_Random_Position[Energy_Current_Index] and Energy_Picked_Position[Energy_Current_Index]) Less than or equal to 10.00
-
Then - Actions
- Unit - Kill Energy_Earth[Energy_Current_Index]
- Trigger - Turn on Elemental Loop <gen>
- Trigger - Turn off Elemental Random Go <gen>
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Random[Energy_Current_Index] Equal to Energy[2]
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between Energy_Random_Position[Energy_Current_Index] and Energy_Picked_Position[Energy_Current_Index]) Less than or equal to 10.00
-
Then - Actions
- Unit - Kill Energy_Fire[Energy_Current_Index]
- Trigger - Turn on Elemental Loop <gen>
- Trigger - Turn off Elemental Random Go <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Random[Energy_Current_Index] Equal to Energy[3]
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between Energy_Random_Position[Energy_Current_Index] and Energy_Picked_Position[Energy_Current_Index]) Less than or equal to 10.00
-
Then - Actions
- Unit - Kill Energy_Poison[Energy_Current_Index]
- Trigger - Turn on Elemental Loop <gen>
- Trigger - Turn off Elemental Random Go <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Random[Energy_Current_Index] Equal to Energy[4]
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between Energy_Random_Position[Energy_Current_Index] and Energy_Picked_Position[Energy_Current_Index]) Less than or equal to 10.00
-
Then - Actions
- Unit - Kill Energy_Water[Energy_Current_Index]
- Trigger - Turn on Elemental Loop <gen>
- Trigger - Turn off Elemental Random Go <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Energy_Random[Energy_Current_Index] Equal to Energy[5]
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between Energy_Random_Position[Energy_Current_Index] and Energy_Picked_Position[Energy_Current_Index]) Less than or equal to 10.00
-
Then - Actions
- Unit - Kill Energy_Dark[Energy_Current_Index]
- Trigger - Turn on Elemental Loop <gen>
- Trigger - Turn off Elemental Random Go <gen>
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
Events
-
Elemental Hit
-
Events
- Unit - A unit Dies
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Dying unit) Equal to Energy_Earth[Energy_Current_Index]
-
Then - Actions
- Unit - Create 1 Dummy for (Owner of Energy_Caster[Energy_Current_Index]) at Energy_Earth_Position[Energy_Current_Index] facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit - Set level of Earth's Ability for (Last created unit) to (Level of Elemental Energies for Energy_Caster[Energy_Current_Index])
- Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
- Unit - Remove Energy_Earth[Energy_Current_Index] from the game
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Dying unit) Equal to Energy_Fire[Energy_Current_Index]
- Then - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Dying unit) Equal to Energy_Poison[Energy_Current_Index]
- Then - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Dying unit) Equal to Energy_Water[Energy_Current_Index]
- Then - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Dying unit) Equal to Energy_Dark[Energy_Current_Index]
- Then - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
The Problem is that all the energy balls do not go and explode.
Everytime 1 ball is left in its position.
I want all of the balls to hit to random enemies.
I'm wondering what is wrong with my Triggers.
I suggest to download the spell in the attachment to view it.
Last edited: