Slide Skill with an AoE Knockback

colinjames12

Member
Reaction score
0
I'm not really sure what I'm doing here in this triggers but I want to make a rush/slide type of skill with a knockback to whoever touches the caster while sliding.

The triggers works fine at first but when casted again, the knockback doesn't work anymore.
Trigger:
  • hammer spin Copy 3
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rush
      • (Unit-type of (Triggering unit)) Equal to Krakos
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Shake the camera for (Picked player) with magnitude 30.00
      • Unit - Make (Triggering unit) Invulnerable
      • Set hammerunit_Copy_3 = (Triggering unit)
      • Set hammertarget_Copy_3 = (Target point of ability being cast)
      • Animation - Play hammerunit_Copy_3's spell animation
      • Unit - Pause (Triggering unit)
      • Sound - Play danger <gen> at 100.00% volume, attached to (Triggering unit)
      • Quest - Display to (All players) the Warning message: |c00FF0000DANGER!!|...
      • Wait 1.00 seconds
      • Animation - Play hammerunit_Copy_3's attack animation
      • Trigger - Turn on hammer spin 2 Copy 3 <gen>
      • Wait 1.50 seconds
      • Animation - Reset hammerunit_Copy_3's animation
      • Unit - Unpause (Triggering unit)
      • Trigger - Turn off hammer spin 2 Copy 3 <gen>
      • Unit - Make (Triggering unit) Vulnerable
      • Custom script: call RemoveLocation (udg_hammertarget_Copy_3)
      • Trigger - Turn on (This trigger)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Reset camera for (Picked player) to standard game-view over 3.00 seconds

Trigger:
  • hammer spin 2 Copy 3
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set hammerpoint_Copy_3 = (Position of hammerunit_Copy_3)
      • Set hammerpoint2_Copy_3 = (hammerpoint_Copy_3 offset by 30.00 towards (Facing of hammerunit_Copy_3) degrees)
      • Special Effect - Create a special effect attached to the origin of hammerunit_Copy_3 using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Move hammerunit_Copy_3 instantly to hammerpoint2_Copy_3, facing (Facing of hammerunit_Copy_3) degrees
      • Set hammertargetz_Copy_3 = (Units within 500.00 of hammerpoint_Copy_3 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of hammerunit_Copy_3)) Equal to False) and ((((Matching
      • Unit Group - Pick every unit in hammertargetz_Copy_3 and do (Actions)
        • Loop - Actions
          • Trigger - Turn on hammer spin 2 Copy 3 knockback <gen>
          • Set hammertargetpoint = (Position of (Picked unit))
          • Set hammerpointangle = (Angle from hammerpoint_Copy_3 to hammertargetpoint)
          • Hashtable - Save hammerpointangle as 1 of (Key (Picked unit)) in hammertargethashtable
          • Hashtable - Save hammerknockbacktime as 2 of (Key (Picked unit)) in hammertargethashtable
          • Unit Group - Add (Picked unit) to hammertargetz_Copy_3_Copy
          • If ((Unit-type of hammerunit_Copy_3) Equal to Krakos) then do (Unit - Cause hammerunit_Copy_3 to damage (Picked unit), dealing 125.00 damage of attack type Chaos and damage type Normal) else do (Do nothing)
          • Custom script: call RemoveLocation(udg_hammertargetpoint)
      • Custom script: call RemoveLocation(udg_hammerpoint_Copy_3)
      • Custom script: call RemoveLocation(udg_hammerpoint2_Copy_3)
      • Custom script: call DestroyGroup(udg_hammertargetz_Copy_3)

Trigger:
  • hammer spin 2 Copy 3 knockback
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in hammertargetz_Copy_3_Copy and do (Actions)
        • Loop - Actions
          • Set hammerpointangle = (Load 1 of (Key (Picked unit)) from hammertargethashtable)
          • Set hammerknockbacktime = (Load 2 of (Key (Picked unit)) from hammertargethashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • hammerknockbacktime Greater than 0.00
            • Then - Actions
              • Set hammertargetpoint = (Position of (Picked unit))
              • Set hammertargetpoint_Copy = (hammertargetpoint offset by 40.00 towards hammerpointangle degrees)
              • Unit - Move (Picked unit) instantly to hammertargetpoint_Copy, facing (Facing of (Picked unit)) degrees
              • Custom script: call RemoveLocation(udg_hammertargetpoint)
              • Custom script: call RemoveLocation(udg_hammertargetpoint_Copy)
              • Hashtable - Save (hammerknockbacktime - 0.03) as 2 of (Key (Picked unit)) in hammertargethashtable
            • Else - Actions
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in hammertargethashtable
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • hammerknockbacktime Equal to 0.00
            • Then - Actions
              • Unit Group - Remove (Picked unit) from hammertargetz_Copy_3_Copy
            • Else - Actions
 

NotInTheFace

Member
Reaction score
17
I'm thinking the problem is your ifs in the 3rd trigger. You start with 2 and subtract .03 each iteration. That's not going to ever end up as 0.00. if you just move your
Trigger:
  • Unit Group - Remove (Picked unit) from hammertargetz_Copy_3_Copy

up into the else of the previous if block it might work.
 

colinjames12

Member
Reaction score
0
No, the two is not the value of which I set the hammerknockbacktime variable. I set it to 3 and it's in my map initialization trigger. But I'm going to check again just to make sure.
 
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