- Joined
- Apr 19, 2011
- Messages
- 1,331
So, I tried to make a spell like this :
Spell Effects : Hero target an area. Then, if an ennemi escape or enter the area, he will get damaged. Spell will end after 5seconds.
Special Effects (visuals) : Hero target an area. 18dummys are created around the area. These dummyes will turn around the area center. Dummyes will die after 5seconds.
Now this is the problem :
1. Dummyes aren't turning around the area center.
2. If an ennemi escape or enter the area, he isn't damaged.
Triggers :
Spell Effects : Hero target an area. Then, if an ennemi escape or enter the area, he will get damaged. Spell will end after 5seconds.
Special Effects (visuals) : Hero target an area. 18dummys are created around the area. These dummyes will turn around the area center. Dummyes will die after 5seconds.
Now this is the problem :
1. Dummyes aren't turning around the area center.
2. If an ennemi escape or enter the area, he isn't damaged.
Triggers :
-
Cercle de Lune
-
Events
-
Unit - A unit Start the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal In Cercle de Lune
-
-
Actions
-
Set CdL_Index = (CdL_Index + 1)
-
Set CdL_Caster[CdL_Index] = (Triggering unit)
-
Set CdL_Level[CdL_Index] = (Level of Cercle de Lune for CdL_Caster[CdL_Index])
-
Set CdL_Point[CdL_Index] = (Target point of ability being cast)
-
Set CdL_Group[CdL_Index] = (Units within 300.00 of CdL_Point[CdL_Index] matching (((Matching unit) belongs to an enemy of (Owner of CdL_Caster[CdL_Index])) Equal to* TRUE))
-
Unit - Create 1 CdL Centre for (Owner of CdL_Caster[CdL_Index]) at CdL_Point[CdL_Index] facing CdL_Point[CdL_Index]
-
Set CdL_CentreUnit[CdL_Index] = (Last created unit)
-
Unit - Add a 5.00 second Generic expiration timer to CdL_CentreUnit[CdL_Index]
-
For each (Integer A) from 1 to 18, do (Actions)
-
Loop - Actions
-
Set CdL_Point2 = (CdL_Point[CdL_Index] offset by 300.00 towards (20.00 x (Real((Integer A)))) degrees)
-
Unit - Create 1 CdL Turn for (Owner of CdL_Caster[CdL_Index]) at CdL_Point2 facing CdL_Point[CdL_Index]
-
Unit Group - Add (Last created unit) to CdL_GroupeTurnUnits[CdL_Index]
-
Unit - Add a 5.00 second Générique expiration timer to (Last created unit)
-
Custom script: call RemoveLocation( udg_CdL_Point2 )
-
-
-
Trigger - Turn on CdL Loop <gen>
-
Trigger - Turn on CdL End <gen>
-
-
-
CdL Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from CdL_Index2 to CdL_Index, do (Actions)
-
Loop - Actions
-
For each (Integer B) from 1 to 18, do (Actions)
-
Loop - Actions
-
Set CdL_RandomUnit = (Random unit from CdL_GroupeTurnUnits[(Integer A)])
-
Unit Group - Remove CdL_RandomUnit from CdL_GroupeTurnUnits[(Integer A)]
-
Unit Group - Add CdL_RandomUnit to CdL_GroupTurnUnits2
-
Set CdL_Point2 = (CdL_Point[(Integer A)] offset by 300.00 towards ((Facing of CdL_RandomUnit) - 182.00) degrees)
-
Unit - Move CdL_RandomUnit instantly to CdL_Point2, facing CdL_Point[(Integer A)]
-
Custom script: call RemoveLocation( udg_CdL_Point2 )
-
-
-
Unit Group - Add all units of CdL_GroupTurnUnits2 to CdL_GroupeTurnUnits[(Integer A)]
-
Unit Group - Remove all units from CdL_GroupTurnUnits2
-
Set CdL_Group2 = (Units within 300.00 of CdL_Point[(Integer A)] matching ((((Matching unit) is in CdL_Group[(Integer A)]) Equal In FALSE) and (((Matching unit) belongs to an enemy of (Owner of CdL_Caster[(Integer A)])) Equal In TRUE)))
-
Unit Group - Pick every unit in CdL_Group2 and do (Actions)
-
Loop - Actions
-
Unit - Cause CdL_Caster[(Integer A)] to damage (Picked unit), dealing (100.00 + (50.00 x (Real(CdL_Level[(Integer A)])))) damage of attack type Spells and damage type Magic
-
-
-
Custom script: call DestroyGroup( udg_CdL_Group2 )
-
Set CdL_Group3 = (Units within 300.00 of CdL_Point[(Integer A)] matching (((Matching unit) belongs to an enemy of (Owner of CdL_Caster[(Integer A)])) Equal In TRUE))
-
Unit Group - Pick every unit in CdL_Group[(Integer A)] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is in CdL_Group3) Equal In FALSE
-
-
Then - Actions
-
Unit - Cause CdL_Caster[(Integer A)] to damage (Picked unit), dealing (100.00 + (50.00 x (Real(CdL_Level[(Integer A)])))) damage of attack type Spell and damage type Magic
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup( udg_CdL_Group3 )
-
Custom script: call DestroyGroup( udg_CdL_Group[bj_forLoopAIndex] )
-
Set CdL_Group[(Integer A)] = (Units within 300.00 of CdL_Point[(Integer A)] matching (((Matching unit) belongs to an enemy of (Owner of CdL_Caster[(Integer A)])) Equal In TRUE))
-
-
-
-
-
CdL End
-
Events
-
Unit - A unit Die
-
-
Conditions
-
(Unit-type of (Dying unit)) Equal In CdL Centre
-
-
Actions
-
Set CdL_Index2 = (CdL_Index2 + 1)
-
Custom script: call DestroyGroup( udg_CdL_Group[udg_CdL_Index2] )
-
Custom script: call RemoveLocation( udg_CdL_Point[udg_CdL_Index2] )
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(CdL_Index + 1) Equal In CdL_Index2
-
-
Then - Actions
-
Trigger - Turn off CdL Loop <gen>
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Last edited: