• 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 for Caravan

Status
Not open for further replies.
Level 3
Joined
Aug 24, 2007
Messages
42
Okay I have a little Problem with a Trigger...
I made a Caravan and set Waypoints... Its working... but I want the Caravan to stop if its attacked and continue to next Waypoinbt after defeating the attaking Units... To get the Caravan defending itself wasnt a Problem, but I dont know how to get them continue walking to next Waypoint... Maybe with JASS Triggers?

Thx for your answers!

Edit: Oh i have a 2. Question... Hwo to make a Condition like: Unit is in Unit Group? I only found sth. for Random Unit of Unit Group...
 
Level 5
Joined
May 21, 2006
Messages
174
One way of checking if the caravan is stopped or not is to check if its order string is "idle":
  • Idle Caravan
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set tempPoint = (Center of Caravan Move <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current order of CaravanUnit) Equal to (Order(idle))
        • Then - Actions
          • Unit Group - Order CaravanGroup to Attack-Move To tempPoint
        • Else - Actions
      • Custom script: call RemoveLocation( udg_tempPoint )
For you second question, what you're looking for is under "Boolean->Is Unit In Group" condition:
  • (CaravanUnit is in CaravanGroup) Equal to True
 
Status
Not open for further replies.
Top