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