Adding Walking Animation

Crusher

You can change this now in User CP.
Reaction score
121
So, once the units have been lifted, I want to add them an walk animation.

Note for the spell: all credits goes to Paladon.

Trigger:
  • Initial Telekinesis
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Telekinesis
    • Actions
      • -------- --------
      • -------- General Spell Settings --------
      • -------- --------
      • Set TK_SpecialEffect = Abilities\Spells\Undead\OrbOfDeath\OrbOfDeathMissile.mdl
      • -------- This returns the path of the special effect used upon lifting. --------
      • Set TK_Speed = 1.00
      • -------- This returns the speed of the Telekinesis (Lifting, crushing down) --------
      • Set TK_HighPerLevel[1] = 220.00
      • Set TK_HighPerLevel[2] = 360.00
      • -------- This returns the reachable high per level. [1] Is the minimal reachable high per level, [2] the maximal reachable high per level. --------
      • Set TK_DamageAoE = 350.00
      • -------- This returns the AoE of the damage dealt upon impact. --------
      • Set TK_PercentDamage = 12.00
      • -------- This returns the percent of the flying high done in damage to the lifted unit and enemied units in the choosen AoE. --------
      • Set TK_DirectDamageTarget = (30.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))
      • -------- This returns the direct damage dealt to the lifted unit upon impact. --------
      • Set TK_DirectDamageAoE = (40.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))
      • -------- This returns the direct damage dealt to enemies in the choosen AoE upon impact. --------
      • Set TK_StompEffect = Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • -------- This returns the path of the special effect used upon impact. --------
      • -------- --------
      • -------- End of Settings --------
      • -------- Spell --------
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TK_Integers[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Telekinesis <gen>
        • Else - Actions
      • Set TK_Integers[1] = (TK_Integers[1] + 1)
      • Set TK_TempPoint = (Target point of ability being cast)
      • Set TK_UnitGroup[1] = (Units within (100.00 + (100.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))) of TK_TempPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is in TK_FlyingUnits) Equal to False)) and ((((Matching unit)
      • Unit Group - Pick every unit in TK_UnitGroup[1] and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to TK_FlyingUnits
          • Set TK_Integers[2] = (TK_Integers[2] + 1)
          • Set TK_Integers[4] = (TK_Integers[4] + 1)
          • Set TK_Unit[TK_Integers[2]] = (Picked unit)
          • Set TK_Hero[TK_Integers[2]] = (Triggering unit)
          • Set TK_MaxFlyingHigh[TK_Integers[2]] = ((Random real number between TK_HighPerLevel[1] and TK_HighPerLevel[2]) x (Real((Level of (Ability being cast) for (Triggering unit)))))
          • Set TK_Real[TK_Integers[2]] = 0.00
          • Set TK_SpeedInt[TK_Integers[2]] = (Random real number between (TK_Speed x 0.80) and (TK_Speed x 1.20))
          • Set TK_ReachedMax[TK_Integers[2]] = False
          • Unit - Pause TK_Unit[TK_Integers[2]]
          • Unit - Add Storm Crow Form to TK_Unit[TK_Integers[2]]
          • Unit - Remove Storm Crow Form from TK_Unit[TK_Integers[2]]
      • Custom script: call RemoveLocation (udg_TK_TempPoint)
      • Custom script: call DestroyGroup (udg_TK_UnitGroup[1])


Trigger:
  • Telekinesis
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer TK_Integers[3]) from 1 to TK_Integers[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TK_Unit[TK_Integers[3]] is in TK_FlyingUnits) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • (Current flying height of TK_Unit[TK_Integers[3]]) Less than or equal to 0.01
                      • TK_ReachedMax[TK_Integers[3]] Equal to True
                • Then - Actions
                  • Set TK_TempPoint = (Position of TK_Unit[TK_Integers[3]])
                  • Special Effect - Create a special effect at TK_TempPoint using TK_StompEffect
                  • Special Effect - Destroy (Last created special effect)
                  • Set TK_UnitGroup[1] = (Units within TK_DamageAoE of TK_TempPoint matching (((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is in TK_FlyingUnits) Equal to False) or ((Matching unit) Equal to TK_Unit[TK_Integers[3]]))) and ((((Matching unit) is alive) Equal
                  • Unit Group - Pick every unit in TK_UnitGroup[1] and do (Actions)
                    • Loop - Actions
                      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Unit - Cause TK_Hero[TK_Integers[3]] to damage (Picked unit), dealing (TK_MaxFlyingHigh[TK_Integers[3]] x (TK_PercentDamage / 100.00)) damage of attack type Spells and damage type Universal
                  • Set TK_UnitGroup[2] = (Units within TK_DamageAoE of TK_TempPoint matching ((((((Matching unit) is A structure) Equal to False) and ((Matching unit) Not equal to TK_Unit[TK_Integers[3]])) and (((Matching unit) is in TK_FlyingUnits) Equal to False)) and ((((Matching unit) is alive)
                  • Unit Group - Pick every unit in TK_UnitGroup[1] and do (Actions)
                    • Loop - Actions
                      • Unit - Cause TK_Hero[TK_Integers[3]] to damage (Picked unit), dealing TK_DirectDamageAoE damage of attack type Spells and damage type Universal
                  • Unit - Cause TK_Hero[TK_Integers[3]] to damage TK_Unit[TK_Integers[3]], dealing TK_DirectDamageTarget damage of attack type Spells and damage type Magic
                  • Unit Group - Remove TK_Unit[TK_Integers[3]] from TK_FlyingUnits
                  • Unit - Unpause TK_Unit[TK_Integers[3]]
                  • Set TK_Real[TK_Integers[3]] = 0.00
                  • Set TK_Hero[TK_Integers[3]] = No unit
                  • Set TK_Unit[TK_Integers[3]] = No unit
                  • Set TK_FlyingHigh[TK_Integers[3]] = 0.00
                  • Set TK_Integers[4] = (TK_Integers[4] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TK_Integers[4] Equal to 0
                    • Then - Actions
                      • Trigger - Turn off Telekinesis <gen>
                      • Set TK_Integers[1] = 0
                      • Set TK_Integers[2] = 0
                    • Else - Actions
                  • Custom script: call DestroyGroup (udg_TK_UnitGroup[1])
                  • Custom script: call DestroyGroup (udg_TK_UnitGroup[2])
                  • Custom script: call RemoveLocation (udg_TK_TempPoint)
                • Else - Actions
                  • Set TK_Real[TK_Integers[3]] = (TK_Real[TK_Integers[3]] + (1.20 x TK_SpeedInt[TK_Integers[3]]))
                  • Set TK_FlyingHigh[TK_Integers[3]] = ((Sin(TK_Real[TK_Integers[3]])) x TK_MaxFlyingHigh[TK_Integers[3]])
                  • Animation - Change TK_Unit[TK_Integers[3]] flying height to TK_FlyingHigh[TK_Integers[3]] at 1000000000.00
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 10) Equal to 1
                    • Then - Actions
                      • Special Effect - Create a special effect attached to the origin of TK_Unit[TK_Integers[3]] using TK_SpecialEffect
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TK_Real[TK_Integers[3]] Greater than or equal to 90.00
                      • TK_ReachedMax[TK_Integers[3]] Equal to False
                    • Then - Actions
                      • Set TK_SpeedInt[TK_Integers[3]] = (TK_SpeedInt[TK_Integers[3]] x 3.00)
                      • Set TK_ReachedMax[TK_Integers[3]] = True
                    • Else - Actions
            • Else - Actions
 

Zerox

Ultra Cool Member
Reaction score
28
Isn't there just a trigger for ordering a unit to play ____ animation? Would that work?
 

Crusher

You can change this now in User CP.
Reaction score
121
It would, but since I have variables, it would be much better to use them, that's why I created a new thread.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top