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

Chasing Quest

Status
Not open for further replies.
Level 5
Joined
Sep 30, 2011
Messages
178
Hello, once again. This time I wanna ask you guys about chasing quest, you chase a villain, but how you make the trigger that when your units is too far from the chased villain and you lose?
 
Level 6
Joined
Dec 9, 2008
Messages
233
  • Melee Initialization
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • (Distance between (Position of (Triggering unit)) and (Position of (Triggering unit))) Greater than or equal to 1000.00
    • Actions
      • Do nothing
Instead of triggering units put your custom units and instead of actions put what do you want to happen when villain leaves lets say 1000 range, like quest failure etc.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
When the quest is activated, you set two units:

Set Chaser = Triggering Unit (Or whichever unit you use, depends on your quest activation trigger)
Set Villain = Your villain

  • Melee Initialization
  • Events
    • Time - Every 0.50 seconds of game time
  • Conditions
  • Actions
    • Set Point1 = (Position of Chaser)
    • Set Point2 = (Position of Villain)
    • If Then Else
      • If - Conditions
        • Distance between Point1 and Point2 is greater than xxxxxx
      • Then - Actions
        • Trigger - Your actions...
      • Else - Actions
        • Trigger - Your actions...
    • Custom script: call RemoveLocation(udg_Point1)
    • Custom script: call RemoveLocation(udg_Point2)
 
Status
Not open for further replies.
Top