• 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.

[Trigger] Patrol Trigger Problem

Status
Not open for further replies.
Level 3
Joined
Dec 22, 2007
Messages
28
Hiya

I just got a problem with my escape map ><

How do I make an unit patroling the way like on the pic? (click to enlarge :))

Trigger Pic.jpg

-> means: Area 1 -> Area 2 -> Area 3 -> Area 2 -> Area 1 -> Area 2 and so on.

Already tried it with vars but didnt work..


Best wishes

Simi
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
You forget that your confusing the unit. I can imagine the poor fellow thinks: I'm in Region 2, but I'm ordered to go the both Region 1 and 3!

To solve this: Change the trigger that takes effect when you enter region 2 a bit. You will get these triggers:

  • Area 1
    • Events
      • A unit enters Area 1 <gen>
    • Conditions
      • (Triggering unit) is in Patrol Unit Group (<--- Unit Group variable)
    • Actions
      • Order (Triggering unit) to Move to (Center of (Area 2))
  • Area 2
    • Events
      • A unit enters Area 2 <gen>
    • Conditions
      • (Triggering unit) is in Patrol Unit Group (<--- Unit Group variable)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FromArea1 = True (FromArea1 is a Boolean variable to check from which Area the unit came from)
        • Then - Actions
          • Order (Triggering unit) to Move to (Center of (Area 3))
          • Set FromArea1 = False
        • Else - Actions
          • Order (Triggering unit) to Move to (Center of (Area 1))
          • Set FromArea1 = True
  • Area 3
    • Events
      • A unit enters Area 3 <gen>
    • Conditions
      • (Triggering unit) is in Patrol Unit Group (<--- Unit Group variable)
    • Actions
      • Order (Triggering unit) to Move to (Center of (Area 2))

EDIT: I was making these triggers while you posted that. I don't get why you use such hard JASS for something this simple.
 
Status
Not open for further replies.
Top