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

Detect Players in region

Status
Not open for further replies.
Level 10
Joined
Apr 3, 2006
Messages
535
is it possible to detects in players are in a region, or have left a region to make an event happen.

Eg boss fight - all players die, reset boss
 
You can use a boolean variable (true/false) and use it like this:
  • Tr1
  • Events
    • Unit - A unit enters Region 001 <gen>
  • Conditions
    • ((Owner of (Triggering unit))'s Controller) Equal to User
  • Actions
    • Set Entered[Player number of (Triggering player)] = True
  • Tr2
  • Events
    • Unit - A unit leaves Region 001 <gen>
  • Conditions
    • ((Owner of (Triggering unit))'s Controller) Equal to User
  • Actions
    • Set Entered[Player number of (Triggering player)] = False
 
Level 10
Joined
Apr 3, 2006
Messages
535
does Unit - A unit leaves Region work if a unit dies and leaves that way or only if they physicaly walk off the region?
 
Status
Not open for further replies.
Top