- Joined
- Jun 30, 2014
- Messages
- 72
It seems like the call: RemoveLocation doesn't recognize the point array set by using the Integer A Loop. Can someone confirm that that's the problem?
(Can someone confirm that setting each of an array's index slots in this way will work?)
I mean, this worked just fine until I added the "Clean Leaks" part and wanted a fast way to set 10 or so "Point with Polar Offset" to a variable so I can remove those locations, otherwise repeated use of this spell might make tons of leaks.
Edit: Should this be re-posted to "Triggers&Scripts"?
(Can someone confirm that setting each of an array's index slots in this way will work?)
I mean, this worked just fine until I added the "Clean Leaks" part and wanted a fast way to set 10 or so "Point with Polar Offset" to a variable so I can remove those locations, otherwise repeated use of this spell might make tons of leaks.
Leap Skill 1
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Leap (Dummy, channel, Crow transition
Actions
-------- Faces Caster Toward Target --------
Unit - Make (Casting unit) face (Target point of ability being cast) over 0.00 seconds
-------- Set Variables --------
Set Leaper = (Casting unit)
Set LeapOrigin = (Position of (Casting unit))
Set LeapTarget = (Target point of ability being cast)
Set LeapFacing = (Facing of Leaper)
Set LeapMoveAngle = (LeapFacing + 180.00)
Set LeapDist = (Distance between LeapOrigin and LeapTarget)
Set LeapStep[0] = (LeapDist / 10.00)
Set LeapStep[1] = (LeapStep[0] + LeapStep[1])
Set LeapStep[2] = (LeapStep[1] + LeapStep[1])
Set LeapStep[3] = (LeapStep[2] + LeapStep[1])
Set LeapStep[4] = (LeapStep[3] + LeapStep[1])
Set LeapStep[5] = (LeapStep[4] + LeapStep[1])
Set LeapStep[6] = (LeapStep[5] + LeapStep[1])
Set LeapStep[7] = (LeapStep[6] + LeapStep[1])
Set LeapStep[8] = (LeapStep[7] + LeapStep[1])
Set LeapStep[9] = (LeapStep[8] + LeapStep[1])
Set LeapStep[10] = (LeapStep[9] + LeapStep[1])
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set LeapTemps[(Integer A)] = (LeapTarget offset by LeapStep[(Integer A)] towards LeapMoveAngle degrees)
-------- Leap Action --------
Unit - Pause Leaper
Unit - Turn collision for Leaper Off
Unit - Add Crow Form to Leaper
-------- Repeat These 3 Actions For Each "Step" --------
Animation - Change Leaper flying height to Leap_Height_Increment at 900.00
Unit - Move Leaper instantly to LeapTemps[10], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 2.00) at 900.00
Unit - Move Leaper instantly to LeapTemps[9], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 3.00) at 900.00
Unit - Move Leaper instantly to LeapTemps[8], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 4.00) at 950.00
Unit - Move Leaper instantly to LeapTemps[7], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 5.00) at 950.00
Unit - Move Leaper instantly to LeapTemps[6], facing LeapFacing degrees
Wait 0.20 seconds
Animation - Change Leaper flying height to 600.00 at 950.00
Wait 0.20 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 5.00) at 950.00
Unit - Move Leaper instantly to LeapTemps[5], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 4.00) at 950.00
Unit - Move Leaper instantly to LeapTemps[4], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 3.00) at 900.00
Unit - Move Leaper instantly to LeapTemps[3], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 3.00) at 900.00
Unit - Move Leaper instantly to LeapTemps[2], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 2.00) at 900.00
Unit - Move Leaper instantly to LeapTemps[1], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to Leap_Height_Increment at 950.00
Unit - Move Leaper instantly to LeapTemps[0], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to 0.00 at 950.00
Unit - Move Leaper instantly to LeapTarget, facing LeapFacing degrees
Wait 0.20 seconds
Unit - Remove Crow Form from Leaper
Unit - Unpause Leaper
Unit - Turn collision for Leaper On
-------- Clean Leaks --------
Custom script: call RemoveLocation(udg_LeapTarget)
Custom script: call RemoveLocation(udg_LeapOrigin)
Custom script: call RemoveLocation(udg_LeapTemps[udg_1])
Custom script: call RemoveLocation(udg_LeapTemps[udg_2])
Custom script: call RemoveLocation(udg_LeapTemps[udg_3])
Custom script: call RemoveLocation(udg_LeapTemps[udg_4])
Custom script: call RemoveLocation(udg_LeapTemps[udg_5])
Custom script: call RemoveLocation(udg_LeapTemps[udg_6])
Custom script: call RemoveLocation(udg_LeapTemps[udg_7])
Custom script: call RemoveLocation(udg_LeapTemps[udg_8])
Custom script: call RemoveLocation(udg_LeapTemps[udg_9])
Custom script: call RemoveLocation(udg_LeapTemps[udg_10])
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Leap (Dummy, channel, Crow transition
Actions
-------- Faces Caster Toward Target --------
Unit - Make (Casting unit) face (Target point of ability being cast) over 0.00 seconds
-------- Set Variables --------
Set Leaper = (Casting unit)
Set LeapOrigin = (Position of (Casting unit))
Set LeapTarget = (Target point of ability being cast)
Set LeapFacing = (Facing of Leaper)
Set LeapMoveAngle = (LeapFacing + 180.00)
Set LeapDist = (Distance between LeapOrigin and LeapTarget)
Set LeapStep[0] = (LeapDist / 10.00)
Set LeapStep[1] = (LeapStep[0] + LeapStep[1])
Set LeapStep[2] = (LeapStep[1] + LeapStep[1])
Set LeapStep[3] = (LeapStep[2] + LeapStep[1])
Set LeapStep[4] = (LeapStep[3] + LeapStep[1])
Set LeapStep[5] = (LeapStep[4] + LeapStep[1])
Set LeapStep[6] = (LeapStep[5] + LeapStep[1])
Set LeapStep[7] = (LeapStep[6] + LeapStep[1])
Set LeapStep[8] = (LeapStep[7] + LeapStep[1])
Set LeapStep[9] = (LeapStep[8] + LeapStep[1])
Set LeapStep[10] = (LeapStep[9] + LeapStep[1])
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set LeapTemps[(Integer A)] = (LeapTarget offset by LeapStep[(Integer A)] towards LeapMoveAngle degrees)
-------- Leap Action --------
Unit - Pause Leaper
Unit - Turn collision for Leaper Off
Unit - Add Crow Form to Leaper
-------- Repeat These 3 Actions For Each "Step" --------
Animation - Change Leaper flying height to Leap_Height_Increment at 900.00
Unit - Move Leaper instantly to LeapTemps[10], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 2.00) at 900.00
Unit - Move Leaper instantly to LeapTemps[9], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 3.00) at 900.00
Unit - Move Leaper instantly to LeapTemps[8], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 4.00) at 950.00
Unit - Move Leaper instantly to LeapTemps[7], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 5.00) at 950.00
Unit - Move Leaper instantly to LeapTemps[6], facing LeapFacing degrees
Wait 0.20 seconds
Animation - Change Leaper flying height to 600.00 at 950.00
Wait 0.20 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 5.00) at 950.00
Unit - Move Leaper instantly to LeapTemps[5], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 4.00) at 950.00
Unit - Move Leaper instantly to LeapTemps[4], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 3.00) at 900.00
Unit - Move Leaper instantly to LeapTemps[3], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 3.00) at 900.00
Unit - Move Leaper instantly to LeapTemps[2], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to (Leap_Height_Increment x 2.00) at 900.00
Unit - Move Leaper instantly to LeapTemps[1], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to Leap_Height_Increment at 950.00
Unit - Move Leaper instantly to LeapTemps[0], facing LeapFacing degrees
Wait 0.01 seconds
Animation - Change Leaper flying height to 0.00 at 950.00
Unit - Move Leaper instantly to LeapTarget, facing LeapFacing degrees
Wait 0.20 seconds
Unit - Remove Crow Form from Leaper
Unit - Unpause Leaper
Unit - Turn collision for Leaper On
-------- Clean Leaks --------
Custom script: call RemoveLocation(udg_LeapTarget)
Custom script: call RemoveLocation(udg_LeapOrigin)
Custom script: call RemoveLocation(udg_LeapTemps[udg_1])
Custom script: call RemoveLocation(udg_LeapTemps[udg_2])
Custom script: call RemoveLocation(udg_LeapTemps[udg_3])
Custom script: call RemoveLocation(udg_LeapTemps[udg_4])
Custom script: call RemoveLocation(udg_LeapTemps[udg_5])
Custom script: call RemoveLocation(udg_LeapTemps[udg_6])
Custom script: call RemoveLocation(udg_LeapTemps[udg_7])
Custom script: call RemoveLocation(udg_LeapTemps[udg_8])
Custom script: call RemoveLocation(udg_LeapTemps[udg_9])
Custom script: call RemoveLocation(udg_LeapTemps[udg_10])
Edit: Should this be re-posted to "Triggers&Scripts"?
Last edited: