- Joined
- Oct 12, 2008
- Messages
- 1,570
Hi People,,
working on a spell again, and i found one problem,
one BIIG problem: I cant cast it a second time!
(not even when the first cast is done already!)
The spell is supposed to cast (in these triggers) 7 ghosts, which run towards the targeted unit,,
Here are the triggers:
Yixx,,
P.S. Click Grollo please!
working on a spell again, and i found one problem,
one BIIG problem: I cant cast it a second time!
(not even when the first cast is done already!)
The spell is supposed to cast (in these triggers) 7 ghosts, which run towards the targeted unit,,
Here are the triggers:
-
GC Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Ghostly Confusion (Neutral Hostile)
-
Actions
- -------- --------
- -------- CONSTANTS --------
- -------- --------
- Set GC_Spirits = 7
- Set GC_Range = 500.00
- Set GC_Color = 30.00
- Set GC_Transparancy = 50.00
- -------- --------
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- GC_Integer[1] Equal to 0
-
Then - Actions
- Trigger - Turn on GC Move <gen>
- Else - Actions
-
If - Conditions
- Set GC_Integer[1] = (GC_Integer[1] + 1)
- Set GC_Integer[2] = (GC_Integer[2] + 1)
- Set GC_Unit1[GC_Integer[2]] = (Target unit of ability being cast)
- Set GC_DMG[GC_Integer[2]] = (((Real((Level of (Ability being cast) for (Triggering unit)))) x 2.00) + 19.00)
-
For each (Integer A) from 1 to GC_Spirits, do (Actions)
-
Loop - Actions
- Set GC_Loc1 = ((Position of (Target unit of ability being cast)) offset by GC_Range towards ((360.00 / (Real(GC_Spirits))) x (Real((Integer A)))) degrees)
- Unit - Create 1 Ghost Rider for (Owner of (Triggering unit)) at GC_Loc1 facing (Position of (Target unit of ability being cast))
- Unit Group - Add (Last created unit) to GC_Group1[GC_Integer[2]]
- Animation - Change (Last created unit)'s vertex coloring to (GC_Color%, GC_Color%, GC_Color%) with 100.00% transparency
- Custom script: call RemoveLocation(udg_GC_Loc1)
-
Loop - Actions
- Set GC_CurTrans[GC_Integer[2]] = 100.00
- Set GC_Unit2[GC_Integer[2]] = (Random unit from GC_Group1[GC_Integer[2]])
-
Events
-
GC Move
-
Events
- Time - Every 0.05 seconds of game time
- Conditions
-
Actions
-
For each (Integer GC_Integer[3]) from 1 to GC_Integer[2], do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- GC_Unit1[GC_Integer[3]] Not equal to No unit
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in GC_Group1[GC_Integer[3]]) Greater than 0
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- GC_CurTrans[GC_Integer[3]] Greater than GC_Transparancy
-
Then - Actions
- Set GC_CurTrans[GC_Integer[3]] = (GC_CurTrans[GC_Integer[3]] - 5.00)
- Animation - Change GC_Unit2[GC_Integer[3]]'s vertex coloring to (GC_Color%, GC_Color%, GC_Color%) with GC_CurTrans[GC_Integer[3]]% transparency
-
Else - Actions
- Set GC_Loc2[GC_Integer[3]] = ((Position of GC_Unit1[GC_Integer[3]]) offset by GC_Range towards (Facing of GC_Unit2[GC_Integer[3]]) degrees)
- Unit Group - Add GC_Unit2[GC_Integer[3]] to GC_Group2[GC_Integer[3]]
- Unit Group - Remove GC_Unit2[GC_Integer[3]] from GC_Group1[GC_Integer[3]]
- Unit - Order GC_Unit2[GC_Integer[3]] to Move To GC_Loc2[GC_Integer[3]]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in GC_Group1[GC_Integer[3]]) Equal to 0
-
Then - Actions
- Set GC_CurTrans[GC_Integer[3]] = GC_Transparancy
-
Else - Actions
- Set GC_CurTrans[GC_Integer[3]] = 100.00
- Set GC_Unit2[GC_Integer[3]] = (Random unit from GC_Group1[GC_Integer[3]])
- Custom script: call RemoveLocation(udg_GC_Loc2[udg_GC_Integer[3]])
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Custom script: set bj_wantDestroyGroup=true
-
Unit Group - Pick every unit in (Units within 100.00 of (Position of GC_Unit2[GC_Integer[3]]) matching (((Owner of (Matching unit)) Equal to (Owner of GC_Unit2[GC_Integer[3]])) and (((Matching unit) belongs to an ally of (Owner of GC_Unit2[GC_Integer[3]])) Equal to True))) and do (Actions)
-
Loop - Actions
- Unit - Cause GC_Unit2[GC_Integer[3]] to damage circular area after 0.00 seconds of radius 100.00 at (Position of GC_Unit2[GC_Integer[3]]), dealing GC_DMG[GC_Integer[3]] damage of attack type Magic and damage type Shadow Strike
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + GC_DMG[GC_Integer[3]])
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in GC_Group1[GC_Integer[3]]) Equal to 0
- (Distance between (Position of GC_Unit2[GC_Integer[3]]) and GC_Loc2[GC_Integer[3]]) Less than or equal to 40.00
-
Then - Actions
- Set GC_CurTrans[GC_Integer[3]] = (GC_CurTrans[GC_Integer[3]] + 2.50)
- Unit Group - Pick every unit in GC_Group2[GC_Integer[3]] and do (Animation - Change (Picked unit)'s vertex coloring to (GC_Color%, GC_Color%, GC_Color%) with GC_CurTrans[GC_Integer[3]]% transparency)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- GC_CurTrans[GC_Integer[3]] Greater than or equal to 99.00
-
Then - Actions
-
Unit Group - Pick every unit in GC_Group2[GC_Integer[3]] and do (Actions)
-
Loop - Actions
- Unit - Remove (Picked unit) from the game
- Unit Group - Remove (Picked unit) from GC_Group2[GC_Integer[3]]
-
Loop - Actions
- Set GC_DMG[GC_Integer[3]] = 0.00
- Set GC_CurTrans[GC_Integer[3]] = 100.00
- Set GC_Unit1[GC_Integer[3]] = No unit
- Set GC_Unit2[GC_Integer[3]] = No unit
- Custom script: call RemoveLocation(udg_GC_Loc2[udg_GC_Integer[3]])
- Custom script: call DestroyGroup(udg_GC_Group1[udg_GC_Integer[3]])
- Custom script: call DestroyGroup(udg_GC_Group2[udg_GC_Integer[3]])
- Set GC_Integer[1] = (GC_Integer[1] - 1)
- Set GC_Integer[2] = (GC_Integer[2] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- GC_Integer[1] Equal to 0
-
Then - Actions
- Set GC_Integer[2] = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in GC_Group2[GC_Integer[3]] and do (Actions)
- Else - Actions
-
If - Conditions
- 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)
-
Loop - Actions
-
For each (Integer GC_Integer[3]) from 1 to GC_Integer[2], do (Actions)
-
Events
Yixx,,
P.S. Click Grollo please!