• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

knockback spell help

Status
Not open for further replies.
Level 6
Joined
Oct 11, 2005
Messages
142
how can you make a knock back spell where the unit gets knock back but if the unit hits a cliff/edge they wont go through cause all my knockbacked units aways end up in high cliffs and cant get back down
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
heres a system i made for one of my maps:
  • KnockbackSystem
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 100, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MoveUnitBoolean[(Integer A)] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • moveSpeed[(Integer A)] Greater than or equal to 0.00
                • Then - Actions
                  • Set movePointA[(Integer A)] = (Position of moveUnit[(Integer A)])
                  • Set movePointB[(Integer A)] = (movePointA[(Integer A)] offset by moveSpeed[(Integer A)] towards moveAngle[(Integer A)] degrees)
                  • Unit - Move moveUnit[(Integer A)] instantly to movePointB[(Integer A)]
                  • Custom script: call RemoveLocation(udg_movePointA[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation(udg_movePointA[GetForLoopIndexB()])
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • moveHeight[(Integer A)] Greater than or equal to -45.00
                • Then - Actions
                  • Animation - Change moveUnit[(Integer A)] flying height to moveHeight[(Integer A)] at 1000000000.00
                • Else - Actions
              • Set moveSpeed[(Integer A)] = (moveSpeed[(Integer A)] + moveAcceleration[(Integer A)])
              • Set moveHeight[(Integer A)] = (moveHeight[(Integer A)] + moveHeightSpeed[(Integer A)])
              • Set moveHeightSpeed[(Integer A)] = (moveHeightSpeed[(Integer A)] + moveHeightAcceleration[(Integer A)])
            • Else - Actions
it can be configured to move up to 8192 units at once, and change heights. includes acceleration varaibles also.
 
Status
Not open for further replies.
Top