- Joined
- Mar 27, 2008
- Messages
- 1,003
Well. I have this jump spell here, and frankly it's broken. It says it's missing something and I don't know what. My guess is it's a missing variable and some messed up coding. It's... really quite annoying. Maybe you guys can figure it out.
I'll show the triggers here.
Trigger #1: Ninja Jump
I'll show the triggers here.
Trigger #1: Ninja Jump
-
Ninja Jump
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Ninja Jump
-
-
Actions
-
Set NJUMP_Jumper = (Casting unit)
-
Set NJUMP_CastingPoint = (Position of NJUMP_Jumper)
-
Set NJUMP_TargetPoint = (Target point of ability being cast)
-
Set NJUMP_JumpTimed = False
-
Set NJUMP_SpeedOrTime = 30.00
-
Set NJUMP_Angle = (Angle from NJUMP_CastingPoint to NJUMP_TargetPoint)
-
Set NJUMP_Distance = (Distance between NJUMP_CastingPoint and NJUMP_TargetPoint)
-
Set NJUMP_ImpactSFX = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
-
Set NJUMP_ParabolaHeight = 500.00
-
Trigger - Run Ninja Jump Initialization <gen> (ignoring conditions)
-
Custom script: call RemoveLocation(udg_CastingPoint)
-
Custom script: call RemoveLocation(udg_TargetPoint)
-
-
-
Ninja Jump Initialization
-
Events
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
NJUMP_LoopIndex[1] Equal to 0
-
-
Then - Actions
-
Trigger - Turn on Ninja Jump Loop <gen>
-
-
Else - Actions
-
-
Set NJUMP_LoopIndex[1] = (NJUMP_LoopIndex[1] + 1)
-
Set NJUMP_LoopIndex[2] = (NJUMP_LoopIndex[2] + 1)
-
-------- ------------------------------------------ --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
NJUMP_Distance Less than 1.00
-
-
Then - Actions
-
Set NJUMP_Distance = 1.00
-
-
Else - Actions
-
-
Set NJUMP_JumperIndex[NJUMP_LoopIndex[2]] = NJUMP_Jumper
-
Set NJUMP_MaxDistance[NJUMP_LoopIndex[2]] = NJUMP_Distance
-
Set NJUMP_AngleIndex[NJUMP_LoopIndex[2]] = NJUMP_Angle
-
Set NJUMP_TempPoint[0] = (Position of NJUMP_JumperIndex[NJUMP_LoopIndex[2]])
-
Custom script: set udg_StartCliffHeight[udg_LoopIndex[2]] = GetLocationZ(udg_TempPoint[0])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
NJUMP_JumpTimed Equal to True
-
-
Then - Actions
-
Set NJUMP_SpeedIndex[NJUMP_LoopIndex[2]] = ((NJUMP_Distance / NJUMP_SpeedOrTime) x 0.03)
-
-
Else - Actions
-
Set NJUMP_SpeedIndex[NJUMP_LoopIndex[2]] = NJUMP_SpeedOrTime
-
-
-
Set NJUMP_ImpactSFXIndex[NJUMP_LoopIndex[2]] = NJUMP_ImpactSFX
-
Set NJUMP_ParabolaHeightIndex[NJUMP_LoopIndex[2]] = NJUMP_ParabolaHeight
-
Set NJUMP_CurDistance[NJUMP_LoopIndex[2]] = 0.00
-
Set NJUMP_TargetPointIndex[NJUMP_LoopIndex[2]] = NJUMP_TargetPoint
-
Set NJUMP_Active[NJUMP_LoopIndex[2]] = True
-
Unit - Add Storm Crow Form to NJUMP_JumperIndex[NJUMP_LoopIndex[2]]
-
Unit - Remove Storm Crow Form from NJUMP_JumperIndex[NJUMP_LoopIndex[2]]
-
Unit - Turn collision for NJUMP_JumperIndex[NJUMP_LoopIndex[2]] Off
-
Unit - Pause NJUMP_JumperIndex[NJUMP_LoopIndex[2]]
-
Special Effect - Create a special effect attached to the chest of NJUMP_JumperIndex[NJUMP_LoopIndex[2]] using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
-
Set NJUMP_JumpSFX[NJUMP_LoopIndex[2]] = (Last created special effect)
-
Custom script: call RemoveLocation(udg_TempPoint[0])
-
-
-
Ninja Jump Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer NJUMP_LoopIndex[3]) from 1 to NJUMP_LoopIndex[2], do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
NJUMP_Active[NJUMP_LoopIndex[3]] Equal to True
-
-
Then - Actions
-
Set NJUMP_TempPoint[0] = NJUMP_TargetPointIndex[NJUMP_LoopIndex[3]]
-
Set NJUMP_TempPoint[1] = (Position of NJUMP_JumperIndex[NJUMP_LoopIndex[3]])
-
Set NJUMP_CurDistance[NJUMP_LoopIndex[3]] = (NJUMP_CurDistance[NJUMP_LoopIndex[3]] + NJUMP_SpeedIndex[NJUMP_LoopIndex[3]])
-
Set NJUMP_TempPoint[2] = (NJUMP_TempPoint[1] offset by NJUMP_SpeedIndex[NJUMP_LoopIndex[3]] towards NJUMP_AngleIndex[NJUMP_LoopIndex[3]] degrees)
-
Unit - Move NJUMP_JumperIndex[NJUMP_LoopIndex[3]] instantly to NJUMP_TempPoint[2], facing NJUMP_AngleIndex[NJUMP_LoopIndex[3]] degrees
-
Custom script: set udg_TempReal2 = GetLocationZ(udg_TempPoint[2])
-
Custom script: call RemoveLocation(udg_TempPoint[2])
-
Set NJUMP_TempReal[1] = NJUMP_ParabolaHeightIndex[NJUMP_LoopIndex[3]]
-
Set NJUMP_TempReal[2] = NJUMP_MaxDistance[NJUMP_LoopIndex[3]]
-
Set NJUMP_TempReal[3] = NJUMP_CurDistance[NJUMP_LoopIndex[3]]
-
Custom script: set udg_TempReal[4] = ( 4 * udg_TempReal[1] / udg_TempReal[2] ) * ( udg_TempReal[2] - udg_TempReal[3] ) * ( udg_TempReal[3] / udg_TempReal[2] )
-
Set NJUMP_TempReal[5] = (NJUMP_StartCliffHeight[NJUMP_LoopIndex[3]] - NJUMP_TempReal2)
-
Set NJUMP_TempReal[6] = (NJUMP_TempReal[4] + NJUMP_TempReal[5])
-
Animation - Change NJUMP_JumperIndex[NJUMP_LoopIndex[3]] flying height to (NJUMP_TempReal[6] + 3.00) at 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current flying height of NJUMP_JumperIndex[NJUMP_LoopIndex[3]]) Less than or equal to 2.00
-
-
Then - Actions
-
Special Effect - Destroy NJUMP_JumpSFX[NJUMP_LoopIndex[3]]
-
Set NJUMP_TempPoint[4] = (Position of NJUMP_JumperIndex[NJUMP_LoopIndex[3]])
-
Special Effect - Create a special effect at NJUMP_TempPoint[4] using NJUMP_ImpactSFXIndex[NJUMP_LoopIndex[3]]
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_TempPoint[4])
-
Animation - Change NJUMP_JumperIndex[NJUMP_LoopIndex[3]] flying height to 0.00 at 0.00
-
Unit - Turn collision for NJUMP_JumperIndex[NJUMP_LoopIndex[3]] On
-
Unit - Unpause NJUMP_JumperIndex[NJUMP_LoopIndex[3]]
-
Set NJUMP_JumperIndex[NJUMP_LoopIndex[3]] = No unit
-
Set NJUMP_Active[NJUMP_LoopIndex[3]] = False
-
Set NJUMP_LoopIndex[1] = (NJUMP_LoopIndex[1] - 1)
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_TempPoint[0])
-
Custom script: call RemoveLocation(udg_TempPoint[1])
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
NJUMP_LoopIndex[1] Equal to 0
-
-
Then - Actions
-
Set NJUMP_LoopIndex[2] = 0
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-