Need help adding an animation to a loop trigger

Mr. Reez

New Member
Reaction score
0
Hello anyone :)
I'm looking to add a running animation to a certain spell of the type GUI:
-Cast
-Loop

The spell is as follows:
Trigger:
  • LS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lightning Speed
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI_1 Equal to 0
        • Then - Actions
          • Trigger - Turn on LS Loop <gen>
        • Else - Actions
      • Set MUI_1 = (MUI_1 + 1)
      • Set MUI_2 = (MUI_2 + 1)
      • Set cUnit[MUI_2] = (Triggering unit)
      • Unit - Make cUnit[MUI_2] Invulnerable
      • Unit - Turn collision for cUnit[MUI_2] Off
      • Animation - Change cUnit[MUI_2]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 65.00% transparency
      • Set cPoint[MUI_2] = (Position of cUnit[MUI_2])
      • Set tPoint = (Target point of ability being cast)
      • Set Range[MUI_2] = (100.00 + (50.00 + (Real((Level of Lightning Speed for cUnit[MUI_2])))))
      • Set Angle[MUI_2] = (Angle from cPoint[MUI_2] to tPoint)
      • Set MaxDistance[MUI_2] = (Distance between cPoint[MUI_2] and tPoint)
      • Set Speed[MUI_2] = (30.00 x (Real((Level of Lightning Speed for cUnit[MUI_2]))))
      • Set Distance[MUI_2] = 0.00
      • Custom script: call RemoveLocation (udg_tPoint)
 

Mr. Reez

New Member
Reaction score
0
Trigger:
  • LS Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer MUI_3) from 1 to MUI_2, do (Actions)
        • Loop - Actions
          • Set bPoint[MUI_3] = (Position of cUnit[MUI_3])
          • Set mPoint[MUI_3] = (bPoint[MUI_3] offset by Speed[MUI_3] towards Angle[MUI_3] degrees)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Playable map area) contains cUnit[MUI_3]) Equal to True
            • Then - Actions
              • Unit - Move cUnit[MUI_3] instantly to mPoint[MUI_3]
            • Else - Actions
          • Special Effect - Create a special effect attached to the origin of cUnit[MUI_3] using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set Distance[MUI_3] = (Distance between mPoint[MUI_3] and cPoint[MUI_3])
          • Set gDamage = (Units within Range[MUI_3] of bPoint[MUI_3] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of cUnit[MUI_3])) Equal to True))))
          • Unit Group - Pick every unit in gDamage and do (Actions)
            • Loop - Actions
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set Damage = (((5.00 x (Real((Level of Lightning Speed for cUnit[MUI_3])))) + Distance[MUI_3]) / 10.00)
              • Unit - Cause cUnit[MUI_3] to damage (Picked unit), dealing Damage damage of attack type Spells and damage type Unknown
          • Destructible - Pick every destructible within 150.00 of mPoint[MUI_3] and do (Actions)
            • Loop - Actions
              • Destructible - Kill (Picked destructible)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Playable map area) contains cUnit[MUI_3]) Equal to False
                  • Distance[MUI_3] Greater than or equal to MaxDistance[MUI_3]
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of cUnit[MUI_3] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the origin of cUnit[MUI_3] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Make cUnit[MUI_3] Vulnerable
              • Animation - Change cUnit[MUI_3]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Unit - Turn collision for cUnit[MUI_3] On
              • Custom script: call RemoveLocation (udg_cPoint[udg_MUI_3])
              • Set cUnit[MUI_3] = No unit
              • Set MUI_1 = (MUI_1 - 1)
            • Else - Actions
          • Custom script: call RemoveLocation (udg_bPoint[udg_MUI_3])
          • Custom script: call RemoveLocation (udg_mPoint[udg_MUI_3])
          • Custom script: call DestroyGroup (udg_gDamage)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI_1 Equal to 0
        • Then - Actions
          • Set MUI_2 = 0
          • Trigger - Turn off (This trigger)
        • Else - Actions
    • Credits for the spell to MortAr
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top