tuantai120
Cool Member
- Reaction score
- 1
Hi everybody , i have make a spell move unit with circle from cast to target point like Wild Axes
but in this it move from target point to cast.
I don't understand why
this is trigger , please help me
but in this it move from target point to cast.
I don't understand why
this is trigger , please help me
Trigger:
- Wild Axes
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Wild Axes
- Actions
- Set WildAxes_Count = (WildAxes_Count + 1)
- Set WildAxes_Cast[WildAxes_Count] = (Triggering unit)
- Set WildAxes_Point[0] = (Position of WildAxes_Cast[WildAxes_Count])
- Set WildAxes_Point[1] = (Target point of ability being cast)
- Set WildAxes_Angle[WildAxes_Count] = (Angle from WildAxes_Point[0] to WildAxes_Point[1])
- Set WildAxes_Distance[WildAxes_Count] = (Distance between WildAxes_Point[0] and WildAxes_Point[1])
- Set WildAxes_Tick[WildAxes_Count] = 25
- Unit - Create 1 Dummy for (Owner of WildAxes_Cast[WildAxes_Count]) at WildAxes_Point[0] facing WildAxes_Angle[WildAxes_Count] degrees
- Set WildAxes_Dummy[WildAxes_Count] = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to WildAxes_Dummy[WildAxes_Count]
- Unit - Create 1 Dummy for (Owner of WildAxes_Cast[WildAxes_Count]) at WildAxes_Point[0] facing WildAxes_Angle[WildAxes_Count] degrees
- Set WildAxes_Dummy2[WildAxes_Count] = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to WildAxes_Dummy2[WildAxes_Count]
- Custom script: call RemoveLocation (udg_WildAxes_Point[0])
- Custom script: call RemoveLocation (udg_WildAxes_Point[1])
- Events
Trigger:
- Move Circle
- Events
- Time - Every 0.04 seconds of game time
- Conditions
- Actions
- For each (Integer WildAxes_Integer) from 1 to WildAxes_Count, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- WildAxes_Tick[WildAxes_Integer] Equal to 0
- Then - Actions
- Set WildAxes_Count = (WildAxes_Count - 1)
- For each (Integer B) from WildAxes_Integer to WildAxes_Count, do (Actions)
- Loop - Actions
- Set WildAxes_A[(Integer B)] = WildAxes_A[((Integer B) + 1)]
- Set WildAxes_Angle[(Integer B)] = WildAxes_Angle[((Integer B) + 1)]
- Set WildAxes_B[(Integer B)] = WildAxes_B[((Integer B) + 1)]
- Set WildAxes_Cast[(Integer B)] = WildAxes_Cast[((Integer B) + 1)]
- Set WildAxes_Distance[(Integer B)] = WildAxes_Distance[((Integer B) + 1)]
- Set WildAxes_Dummy[(Integer B)] = WildAxes_Dummy[((Integer B) + 1)]
- Set WildAxes_Dummy2[(Integer B)] = WildAxes_Dummy2[((Integer B) + 1)]
- Set WildAxes_Tick[(Integer B)] = WildAxes_Tick[((Integer B) + 1)]
- Loop - Actions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- WildAxes_Tick[WildAxes_Integer] Greater than 0
- Then - Actions
- Set WildAxes_Tick[WildAxes_Integer] = (WildAxes_Tick[WildAxes_Integer] - 1)
- Set WildAxes_Point[0] = (Position of WildAxes_Cast[WildAxes_Integer])
- Set WildAxes_Point[1] = (Target point of ability being cast)
- Set WildAxes_Distance[WildAxes_Integer] = (Distance between WildAxes_Point[0] and WildAxes_Point[1])
- Set WildAxes_A[WildAxes_Integer] = (WildAxes_Distance[WildAxes_Integer] x (Sin((3.60 x (Real(WildAxes_Tick[WildAxes_Integer]))))))
- Set WildAxes_B[WildAxes_Integer] = (250.00 x (Sin((7.20 x (Real(WildAxes_Tick[WildAxes_Integer]))))))
- Set WildAxes_c = (WildAxes_Point[0] offset by WildAxes_A[WildAxes_Integer] towards WildAxes_Angle[WildAxes_Integer] degrees)
- Set WildAxes_C = (WildAxes_c offset by WildAxes_B[WildAxes_Integer] towards (WildAxes_Angle[WildAxes_Integer] + 90.00) degrees)
- Unit - Move WildAxes_Dummy[WildAxes_Integer] instantly to WildAxes_C
- Set WildAxes_C = (WildAxes_c offset by WildAxes_B[WildAxes_Integer] towards (WildAxes_Angle[WildAxes_Integer] - 90.00) degrees)
- Unit - Move WildAxes_Dummy2[WildAxes_Integer] instantly to WildAxes_C
- Custom script: call RemoveLocation (udg_WildAxes_C)
- Set WildAxes_Point[2] = (Position of WildAxes_Dummy[WildAxes_Integer])
- Set WildAxes_Point[3] = (Position of WildAxes_Dummy2[WildAxes_Integer])
- Set WildAxes_Group = (Units within 100.00 of WildAxes_Point[2] matching ((((Matching unit) belongs to an enemy of (Owner of WildAxes_Cast[WildAxes_Integer])) Equal to True) and (((Matching unit) is in WildAxes_Group) Equal to False)))
- Set WildAxes_Group2 = (Units within 100.00 of WildAxes_Point[3] matching ((((Matching unit) belongs to an enemy of (Owner of WildAxes_Cast[WildAxes_Integer])) Equal to True) and (((Matching unit) is in WildAxes_Group2) Equal to False)))
- Unit Group - Pick every unit in WildAxes_Group and do (Actions)
- Loop - Actions
- Unit - Cause WildAxes_Dummy[WildAxes_Integer] to damage (Picked unit), dealing 250.00 damage of attack type Spells and damage type Normal
- Loop - Actions
- Custom script: call DestroyGroup (udg_WildAxes_Group)
- Unit Group - Pick every unit in WildAxes_Group2 and do (Actions)
- Loop - Actions
- Unit - Cause WildAxes_Dummy2[WildAxes_Integer] to damage (Picked unit), dealing 250.00 damage of attack type Spells and damage type Normal
- Loop - Actions
- Custom script: call DestroyGroup (udg_WildAxes_Group2)
- Custom script: call RemoveLocation (udg_WildAxes_Point[2])
- Custom script: call RemoveLocation (udg_WildAxes_Point[3])
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer WildAxes_Integer) from 1 to WildAxes_Count, do (Actions)
- Events