• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

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