- Joined
- Mar 17, 2012
- Messages
- 582
Hi there!
I have a 1 target spell that's supposed to teleport the caster to the target and then pick random unit in 500 aoe, jump to it and so on, and so forth. It's happening with 1,5 secs frequency. There is a limited number of jumps (4/6/8/10/12/14). Each jump the caster attacks a target and deals fixed damage.
First trigger works, so the caster jumps on the target. But the second one doesn't. I can't undestand what I'm doing wrong, but he doesn't jump.
Here are my triggers:
I have a 1 target spell that's supposed to teleport the caster to the target and then pick random unit in 500 aoe, jump to it and so on, and so forth. It's happening with 1,5 secs frequency. There is a limited number of jumps (4/6/8/10/12/14). Each jump the caster attacks a target and deals fixed damage.
First trigger works, so the caster jumps on the target. But the second one doesn't. I can't undestand what I'm doing wrong, but he doesn't jump.
Here are my triggers:
-
Thunder Dance init
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Thunder Dance new
-
-
Actions
-
Set Player_Number_Int = (Player number of (Owner of (Triggering unit)))
-
Set Thunder_Dance_Caster[Player_Number_Int] = (Triggering unit)
-
Set Thunder_Dance_Target[Player_Number_Int] = (Target unit of ability being cast)
-
Set Thunder_Dance_Target_Point[Player_Number_Int] = (Position of Thunder_Dance_Target[Player_Number_Int])
-
Set Thunder_Dance_Damage[Player_Number_Int] = (((25.00 x 1.00) + 0.00) + ((Real((Intelligence of Thunder_Dance_Caster[Player_Number_Int] (Include bonuses)))) x 0.20))
-
Unit - Add Thunder Dance effect to Thunder_Dance_Caster[Player_Number_Int]
-
Custom script: call SetUnitX (udg_Thunder_Dance_Caster[udg_Player_Number_Int], GetLocationX (udg_Thunder_Dance_Target_Point[udg_Player_Number_Int]))
-
Custom script: call SetUnitY (udg_Thunder_Dance_Caster[udg_Player_Number_Int], GetLocationY (udg_Thunder_Dance_Target_Point[udg_Player_Number_Int]))
-
Unit - Order Thunder_Dance_Caster[Player_Number_Int] to Attack Thunder_Dance_Target[Player_Number_Int]
-
Unit - Cause Thunder_Dance_Caster[Player_Number_Int] to damage Thunder_Dance_Target[Player_Number_Int], dealing Thunder_Dance_Damage[Player_Number_Int] damage of attack type Spells and damage type Fire
-
Set Thunder_Dance_Jumps[Player_Number_Int] = (((Level of Thunder Dance new for Thunder_Dance_Caster[Player_Number_Int]) x 2) + 1)
-
Game - Display to (All players) the text: (String(Thunder_Dance_Jumps[Player_Number_Int]))
-
Custom script: call RemoveLocation(udg_Thunder_Dance_Target_Point[udg_Player_Number_Int])
-
Trigger - Turn on Thunder Dance loop <gen>
-
-
-
Thunder Dance loop
-
Events
-
Time - Every 1.50 seconds of game time
-
-
Conditions
-
Actions
-
Set Thunder_Dance_Casters = (Units of type Storm Wizard)
-
Unit Group - Pick every unit in Thunder_Dance_Casters and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Thunder Dance new for (Picked unit)) Greater than 0
-
-
Then - Actions
-
Set Player_Number_Int = (Player number of (Owner of (Picked unit)))
-
Set Thunder_Dance_Caster[Player_Number_Int] = (Picked unit)
-
Game - Display to (All players) the text: I'm here!
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
-
Thunder_Dance_Jumps[Player_Number_Int] Greater than 0
-
(Thunder_Dance_Caster[Player_Number_Int] is alive) Equal to True
-
-
-
-
Then - Actions
-
Game - Display to (All players) the text: GO
-
Set Thunder_Dance_Caster_Point[Player_Number_Int] = (Position of Thunder_Dance_Caster[Player_Number_Int])
-
Set Thunder_Dance_Group[Player_Number_Int] = (Units within 500.00 of Thunder_Dance_Caster_Point[Player_Number_Int] matching ((((Matching unit) belongs to an enemy of (Owner of Thunder_Dance_Caster[Player_Number_Int])) Equal to True) and ((((Matching unit) is A structure) Not equal to True) and ((((Match
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Thunder_Dance_Group[Player_Number_Int] is empty) Not equal to True
-
-
Then - Actions
-
Unit Group - Pick every unit in Thunder_Dance_Group[Player_Number_Int] and do (Actions)
-
Loop - Actions
-
Set Thunder_Dance_Picked = (Random unit from Thunder_Dance_Group[Player_Number_Int])
-
Set Thunder_Dance_Picked_Point = (Position of Thunder_Dance_Picked)
-
Unit - Turn collision for Thunder_Dance_Caster[Player_Number_Int] Off
-
Unit - Move Thunder_Dance_Caster[Player_Number_Int] instantly to Thunder_Dance_Picked_Point, facing Thunder_Dance_Picked_Point
-
Unit - Turn collision for Thunder_Dance_Caster[Player_Number_Int] On
-
Custom script: call RemoveLocation(udg_Thunder_Dance_Picked_Point)
-
Unit - Order Thunder_Dance_Caster[Player_Number_Int] to Attack Thunder_Dance_Picked
-
Unit - Cause Thunder_Dance_Caster[Player_Number_Int] to damage Thunder_Dance_Picked, dealing Thunder_Dance_Damage[Player_Number_Int] damage of attack type Spells and damage type Fire
-
Set Thunder_Dance_Jumps[Player_Number_Int] = (Thunder_Dance_Jumps[Player_Number_Int] - 1)
-
Game - Display to (All players) the text: (String(Thunder_Dance_Jumps[Player_Number_Int]))
-
-
-
-
Else - Actions
-
Unit - Remove Thunder Dance effect from Thunder_Dance_Caster[Player_Number_Int]
-
Set Thunder_Dance_Jumps[Player_Number_Int] = 0
-
-
-
Custom script: call DestroyGroup(udg_Thunder_Dance_Group[udg_Player_Number_Int])
-
Custom script: call RemoveLocation(udg_Thunder_Dance_Caster_Point[udg_Player_Number_Int])
-
-
Else - Actions
-
Unit - Remove Thunder Dance effect from Thunder_Dance_Caster[Player_Number_Int]
-
Set Thunder_Dance_Jumps[Player_Number_Int] = 0
-
Game - Display to (All players) the text: you're dead
-
-
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup(udg_Thunder_Dance_Casters)
-
-
Last edited: