• 🏆 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!

[Trigger] Unit Movement

Status
Not open for further replies.
Level 11
Joined
Feb 14, 2009
Messages
884
I have a skeleton and I want him to patrol in 4 regions all the time. Here are the triggers I use (These are just 2, the others are similar):


  • Skeleton Movement 1
    • Events
      • Unit - A unit enters Tower1 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Skeleton Lord
    • Actions
      • Set SkeletonGoing = True
      • Set SkeletonPoint = (Center of Tower2 <gen>)
      • Unit - Make (Triggering unit) face 200.00 over 1.00 seconds
      • Wait 2.00 seconds
      • Unit - Order (Triggering unit) to Move To SkeletonPoint
      • Custom script: call RemoveLocation(udg_SkeletonPoint)
  • Skeleton Movement 2
    • Events
      • Unit - A unit enters Tower2 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Skeleton Lord
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SkeletonGoing Equal to True
        • Then - Actions
          • Set SkeletonPoint = (Center of Tower3 <gen>)
        • Else - Actions
          • Set SkeletonPoint = (Center of Tower1 <gen>)
      • Wait 2.00 seconds
      • Unit - Order (Triggering unit) to Move To SkeletonPoint
      • Custom script: call RemoveLocation(udg_SkeletonPoint)
They work absolutely fine when the owner of the skeleton is Player One, but when I change it to Neutral Passive, not only doesn't he wait at the second point, but he also follows a different path to point 1, doesn't turn at either, and stays at point 1 forever when he arrives. Any ideas?
 
Level 11
Joined
Feb 14, 2009
Messages
884
I want to keep the waits, since they make the skeleton look more realistic when he turns. But, I guess you're right about the player, so I'll change it to something else. Thanks.
 
Level 3
Joined
May 7, 2009
Messages
21
If changing from neutral passive doesn't work, and you want to keep the 2 second delay, I'd suggest creating a timer and another trigger to finish off the rest of the actions.
 
Level 11
Joined
Feb 14, 2009
Messages
884
I'll change the unit's controller. It has invulnerability and locust already, so it shouldn't be a problem.
 
Status
Not open for further replies.
Top