- Joined
- Jul 19, 2007
- Messages
- 856
I have a triggered ability in my map named "Rush" and I found it from an old spellpack and when using it, the Hero charges to the target enemy unit, dealing damage and stunning it. But there is a problem if the target enemy unit uses a "Blink" spell when this "Rush" ability is casted, the hero will not stop charge and moves around uncontrollable all the time! Please can someone fix this problem?
-
RushCast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Rush
-
-
Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Triggering unit)) Equal to (Player((Integer A)))
-
-
Then - Actions
-
Set VariableSet RH_Target[(Integer A)] = (Target unit of ability being cast)
-
Set VariableSet RH_TargetPos[(Integer A)] = (Position of RH_Target[(Integer A)])
-
Set VariableSet RH_Caster[(Integer A)] = (Triggering unit)
-
Set VariableSet RH_CasterPos[(Integer A)] = (Position of RH_Caster[(Integer A)])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between RH_CasterPos[(Integer A)] and RH_TargetPos[(Integer A)]) Less than 500.00
-
-
Then - Actions
-
Game - Display to (Player group((Owner of RH_Caster[(Integer A)]))) the text: |cffff0000Target to...
-
Unit - Remove Rush buff from RH_Target[(Integer A)]
-
Set VariableSet RH_Caster[(Integer A)] = No unit
-
Set VariableSet RH_Target[(Integer A)] = No unit
-
Custom script: call RemoveLocation(udg_RH_CasterPos[bj_forLoopAIndex])
-
Custom script: call RemoveLocation(udg_RH_TargetPos[bj_forLoopAIndex])
-
Skip remaining actions
-
-
Else - Actions
-
-
Set VariableSet RH_Level[(Integer A)] = (Level of Rush for RH_Caster[(Integer A)])
-
Unit - Turn collision for RH_Caster[(Integer A)] Off.
-
Animation - Change RH_Caster[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 80.00% transparency
-
Unit - Make RH_Caster[(Integer A)] face RH_Target[(Integer A)] over 0.00 seconds
-
Set VariableSet RH_MoveAngle[(Integer A)] = (Facing of RH_Caster[(Integer A)])
-
Set VariableSet RH_Rushing[(Integer A)] = True
-
-
Else - Actions
-
-
-
-
-
-
RushMove
-
Events
-
Time - Every 0.01 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
RH_Rushing[(Integer A)] Equal to True
-
-
Then - Actions
-
Set VariableSet RH_PrevPos[(Integer A)] = (Position of RH_Caster[(Integer A)])
-
Set VariableSet RH_MovePoint[(Integer A)] = (RH_PrevPos[(Integer A)] offset by 10.00 towards RH_MoveAngle[(Integer A)] degrees.)
-
Unit - Move RH_Caster[(Integer A)] instantly to RH_MovePoint[(Integer A)]
-
Unit - Make RH_Caster[(Integer A)] face RH_Target[(Integer A)] over 0.00 seconds
-
Set VariableSet RH_MoveAngle[(Integer A)] = (Facing of RH_Caster[(Integer A)])
-
Special Effect - Create a special effect at RH_MovePoint[(Integer A)] using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_RH_PrevPos[bj_forLoopAIndex])
-
Custom script: call RemoveLocation(udg_RH_MovePoint[bj_forLoopAIndex])
-
-
Else - Actions
-
-
-
-
-
-
RushDis
-
Events
-
Time - Every 0.01 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(RH_Target[(Integer A)] has buff Rush ) Equal to True
-
-
Then - Actions
-
Unit - Cause RH_Caster[(Integer A)] to damage RH_Target[(Integer A)], dealing ((Real(RH_Level[(Integer A)])) x 90.00) damage of attack type Spells and damage type Normal
-
Animation - Change RH_Caster[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
-
Animation - Play RH_Caster[(Integer A)]'s attack animation
-
Unit - Turn collision for RH_Caster[(Integer A)] On.
-
Set VariableSet RH_Rushing[(Integer A)] = False
-
Set VariableSet RH_Caster[(Integer A)] = No unit
-
Set VariableSet RH_Target[(Integer A)] = No unit
-
-
Else - Actions
-
-
-
-
-