- Joined
- Sep 11, 2013
- Messages
- 467
Greetings!
Today I started to test a Custom Channel Teleport spell that was created few months ago by the outstanding work of @Uncle and @Duckfarter in this <post> and I noticed a little problem and I wonder if someone can solve this problem because I don't know how to solve it by myself..
As you can see in this video below, at 0:06 second, I double use very fast the same spell on the same position and the special effects remain forever stuck on me and on the target and I don't wish that..
I attached the map below.
The help will be appreciated!
Today I started to test a Custom Channel Teleport spell that was created few months ago by the outstanding work of @Uncle and @Duckfarter in this <post> and I noticed a little problem and I wonder if someone can solve this problem because I don't know how to solve it by myself..
As you can see in this video below, at 0:06 second, I double use very fast the same spell on the same position and the special effects remain forever stuck on me and on the target and I don't wish that..
-
Teleport Setup
-
Events
-
Time - Elapsed game time is 0.01 seconds
-
-
Conditions
-
Actions
-
-------- This unit is used to get us a pathable point near our teleport target while not interrupting the caster's orders! --------
-
Unit - Create 1 Teleport Dummy Wisp for Neutral Passive at (Center of (Playable map area)) facing Default building facing degrees
-
Set VariableSet TP_Pathing_Dummy = (Last created unit)
-
Unit - Make TP_Pathing_Dummy Invulnerable
-
Unit - Hide TP_Pathing_Dummy
-
Game - Display to (All players) the text: Create dummy?
-
-
-
Teleport Begin Casting
-
Events
-
Unit - A unit Is issued an order targeting a point
-
-
Conditions
-
(Issued order) Equal to (Order(flare))
-
(Level of Teleport Instant (Ability) for (Triggering unit)) Greater than 0
-
-
Actions
-
Game - Display to (All players) the text: Issue teleport order
-
Set VariableSet TP_Caster = (Triggering unit)
-
Set VariableSet TP_Point[1] = (Target point of issued order)
-
-------- - --------
-
-------- This finds the closest eligible unit to the target point of ability being cast --------
-
Set VariableSet TP_Closest_Unit = No unit
-
Set VariableSet TP_Closest_Distance = 99999.00
-
Set VariableSet TP_Group = (Units in (Playable map area))
-
Unit Group - Remove TP_Caster from TP_Group.
-
-------- - --------
-
Unit Group - Pick every unit in TP_Group and do (Actions)
-
Loop - Actions
-
Set VariableSet TP_Target[0] = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(TP_Target[0] is dead) Equal to False
-
(TP_Target[0] is hidden) Equal to False
-
(TP_Target[0] belongs to an ally of (Owner of TP_Caster).) Equal to True
-
(Owner of TP_Target[0]) Not equal to Neutral Passive
-
-
Then - Actions
-
Set VariableSet TP_Point[2] = (Position of TP_Target[0])
-
Set VariableSet TP_Current_Distance = (Distance between TP_Point[1] and TP_Point[2])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TP_Current_Distance Less than TP_Closest_Distance
-
-
Then - Actions
-
Set VariableSet TP_Closest_Distance = TP_Current_Distance
-
Set VariableSet TP_Closest_Unit = TP_Target[0]
-
-
Else - Actions
-
-
Custom script: call RemoveLocation (udg_TP_Point[2])
-
-
Else - Actions
-
-
-
-
-------- - --------
-
-------- Remove leaks --------
-
Custom script: call RemoveLocation (udg_TP_Point[1])
-
Custom script: call DestroyGroup(udg_TP_Group)
-
-------- - --------
-
-------- Exit if no valid target was found --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TP_Closest_Unit Equal to No unit
-
-
Then - Actions
-
Game - Display to (All players) for 5.00 seconds the text: |cffff0000TELEPORT ...
-
-------- This will interrupt the Order and prevent the ability from ever being used: --------
-
Unit - Order TP_Caster to Stop.
-
Custom script: call BlzPauseUnitEx( udg_TP_Caster, true )
-
Custom script: call BlzPauseUnitEx( udg_TP_Caster, false )
-
Skip remaining actions
-
-
Else - Actions
-
-
-------- - --------
-
Unit Group - Add TP_Caster to TP_Caster_Group
-
Trigger - Turn on Teleport Target Dies <gen>
-
-------- - --------
-
-------- Track the staff target using Unit Indexing: --------
-
Set VariableSet UDex = (Custom value of TP_Caster)
-
Set VariableSet TP_Target[UDex] = TP_Closest_Unit
-
Set VariableSet TP_Number_Of_Teleports_On_Me[(Custom value of TP_Closest_Unit)] = (TP_Number_Of_Teleports_On_Me[(Custom value of TP_Closest_Unit)] + 1)
-
-------- - --------
-
-------- Special effects --------
-
Set VariableSet TP_Point[2] = (Position of TP_Caster)
-
Special Effect - Create a special effect at TP_Point[2] using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect attached to the origin of TP_Caster using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
-
Set VariableSet TP_Effect_Caster[UDex] = (Last created special effect)
-
Special Effect - Create a special effect attached to the origin of TP_Target[UDex] using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
-
Set VariableSet TP_Effect_Target[UDex] = (Last created special effect)
-
Ubersplat - Create ubersplat at TP_Point[2] of type Human Mass Teleport with color (100.00%, 100.00%, 100.00%) and 0.00% transparency (Disable paused state, Disable skipping birth time)
-
Set VariableSet TP_Ubersplat[UDex] = (Last created ubersplat)
-
Ubersplat - Change TP_Ubersplat[UDex]: Enable render always state
-
Ubersplat - Show TP_Ubersplat[UDex]
-
-------- - --------
-
-------- Remove leaks --------
-
Custom script: call RemoveLocation (udg_TP_Point[2])
-
-
-
Teleport Finish Casting
-
Events
-
Unit - A unit Finishes casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Teleport Instant (Ability)
-
-
Actions
-
Game - Display to (All players) the text: Finishes casting
-
Set VariableSet TP_Caster = (Triggering unit)
-
Set VariableSet UDex = (Custom value of TP_Caster)
-
Set VariableSet TP_Point[1] = (Position of TP_Target[UDex])
-
-------- - --------
-
-------- Special effects --------
-
Special Effect - Create a special effect attached to the origin of TP_Target[UDex] using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect attached to the origin of TP_Caster using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- - --------
-
-------- Move caster --------
-
Unit - Unhide TP_Pathing_Dummy
-
Unit - Move TP_Pathing_Dummy instantly to TP_Point[1]
-
Unit - Hide TP_Pathing_Dummy
-
Custom script: call SetUnitX(udg_TP_Caster, GetUnitX(udg_TP_Pathing_Dummy))
-
Custom script: call SetUnitY(udg_TP_Caster, GetUnitY(udg_TP_Pathing_Dummy))
-
-------- - --------
-
-------- More special effects --------
-
Special Effect - Create a special effect attached to the origin of TP_Caster using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- - --------
-
-------- Remove leaks --------
-
Custom script: call RemoveLocation (udg_TP_Point[1])
-
-
-
Teleport Stop Casting
-
Events
-
Unit - A unit Stops casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Teleport Instant (Ability)
-
-
Actions
-
Game - Display to (All players) the text: Stops casting
-
Set VariableSet TP_Caster = (Triggering unit)
-
Set VariableSet UDex = (Custom value of TP_Caster)
-
-------- - --------
-
-------- Reset variables --------
-
Unit Group - Remove TP_Caster from TP_Caster_Group.
-
Set VariableSet TP_Number_Of_Teleports_On_Me[(Custom value of TP_Target[UDex])] = (TP_Number_Of_Teleports_On_Me[(Custom value of TP_Target[UDex])] - 1)
-
Set VariableSet TP_Target[UDex] = No unit
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in TP_Caster_Group) Equal to 0
-
-
Then - Actions
-
Trigger - Turn off Teleport Target Dies <gen>
-
-
Else - Actions
-
-
-------- - --------
-
-------- Remove effects --------
-
Ubersplat - Destroy TP_Ubersplat[UDex]
-
Special Effect - Destroy TP_Effect_Caster[UDex]
-
Special Effect - Destroy TP_Effect_Target[UDex]
-
-
-
Teleport Target Dies
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
TP_Number_Of_Teleports_On_Me[(Custom value of (Triggering unit))] Greater than 0
-
-
Actions
-
-------- This trigger will only be ON while a unit is teleporting! --------
-
Unit Group - Pick every unit in TP_Caster_Group and do (Actions)
-
Loop - Actions
-
Set VariableSet TP_Caster = (Picked unit)
-
Set VariableSet UDex = (Custom value of TP_Caster)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Triggering unit) Equal to TP_Target[UDex]
-
-
Then - Actions
-
Unit - Order TP_Caster to Stop.
-
-
Else - Actions
-
-
-
-
-
I attached the map below.
The help will be appreciated!