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

[Trigger] Checking if units are in region

Status
Not open for further replies.
Level 5
Joined
Nov 7, 2007
Messages
134
Hi, I was wondering, when you check if there is units within X range of a point or inside a region, what is it with the unit that determines if it is there or not? Is it the collision size?

I mean checking with triggers of course, that's why I posted it here.
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
I think it is the collision size. So if you have a very small collision size the centre of your unit must be within range or in the region, but if you have a very big collision size the centre of the unit can be outside. NOTE: I might be wrong, because I have never tested this.
 
Level 5
Joined
Nov 7, 2007
Messages
134
Hm, alright, I suppose I could experiment a little, thank you anyway.

EDIT: Apparently it is NOT the collision size, I did some experiments and I think it is the center of the unit that has to be within the region. So consider this solved.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
It is the middle point (the collision is also emited from that and the mid point is the value you get returned from the natives that return unit position values).

Logically it is possiable, as you simply create a rect and add it to a region, then you can test if a position is inside or outside the region.
 
Status
Not open for further replies.
Top