• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Unit Movement

Status
Not open for further replies.
Level 11
Joined
Feb 14, 2009
Messages
883
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?
 
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.
 
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.
 
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.
Back
Top