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

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