I know this has probably been asked here quite a few times, don't know if someone has presented a solution for it, but here goes.
Somebody just asked me, how to know if player is in a certain location... basic East/West/Resistance is present - triggers won't do, because some friendly soldiers are already in the area. Waypoints are not an option either. BUT this thing can be solved pretty easily.
It isn't the perfect solution though: it isn't accurate. It also has its limitations. But here's the deal:
Using
nearestObject, we can get the name of the nearest object of a unit and if that name equals to our target area, *dang* that's it then. Let's show an example:
1.) Create a unit and name it, here we name it
OurUnit.
2.) Next create a unit that you want to act as the target area, here we name it
Tgt. We'll be using an
invisible helipad as our object.
3.) Create a trigger, and change the condition field to:
nearestObject[OurUnit, "HeliHEmpty"] == Tgt And that should do it. Now you should have a trigger that does whatever you like when
OurUnit goes near
Tgt. The activation range is 50 meters, a limitation when using nearestObject.
I don't know if there are other solutions to this, but this is a working one and not too complex either, although a bit limited because of the range issue. I guess you could do the checking with
getPos too, that you could do as accurately as you would want but the solution presented here might be something to consider if the checking doesn't have to get more accurate than 50 meters.
Enjoy!