• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Knock-IN effect, Pull-IN [GUI]

Status
Not open for further replies.
Level 11
Joined
Jun 26, 2014
Messages
497
@Chaosy for some strange reason the units start to swirl outwards as if they're making a tornado?
  • Nether Pull Loop 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in NPGroup and do (Actions)
        • Loop - Actions
          • Set NPUnitPoint[2] = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between NPCastPoint and NPUnitPoint[2]) Greater than or equal to 50.00
            • Then - Actions
              • Set NPUnitPoint[3] = (NPUnitPoint[2] offset by 15.00 towards (Distance between NPUnitPoint[2] and NPCastPoint) degrees)
              • Unit - Turn collision for (Picked unit) Off
              • Unit - Move (Picked unit) instantly to NPUnitPoint[3]
              • Custom script: call RemoveLocation(udg_NPUnitPoint[2])
              • Custom script: call RemoveLocation(udg_NPUnitPoint[3])
            • Else - Actions
              • Unit - Turn collision for (Picked unit) On
              • Unit Group - Remove (Picked unit) from NPGroup
              • Custom script: call RemoveLocation(udg_NPUnitPoint[2])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in NPGroup) Less than or equal to 0
        • Then - Actions
          • Custom script: call RemoveLocation(udg_NPCastPoint)
          • Custom script: call RemoveLocation(udg_NPUnitPoint[2])
          • Custom script: call RemoveLocation(udg_NPUnitPoint[3])
          • Custom script: call DestroyGroup(udg_NPGroup)
          • Trigger - Turn off (This trigger)
        • Else - Actions
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
et NPUnitPoint[3] = (NPUnitPoint[2] offset by 15.00 towards (Distance between NPUnitPoint[2] and NPCastPoint) degrees)
Might want to check your logic for that... The angle they are being moved at is based on the distance of them from the caster. This almost certainly is not what you want.

You probably meant angle between points, and not distance between points.
 
Status
Not open for further replies.
Top