View Single Post
07/02/23, 03:41 PM   #10
Toirealach
AddOn Author - Click to view addons
Join Date: Sep 2020
Posts: 30
Originally Posted by sirinsidiator View Post
You could try using GetUnitRawWorldPosition to determine if the player is inside the bounding box of a base. Unlike regular map or world coordinates it gives you the "real" position inside 3d space of the loaded world data.
The bases are not really behind the doors you see when you enter, but somewhere a bit further away, so it should be possible to find 2 points that surround the base, but won't overlap with the area outside of it.

Then you can just run the check as needed, or if you want to have a callback, you should be able to use EVENT_PLAYER_ACTIVATED for most entrances and for the ones that do not have a loading screen it should be enough to listen to the invulnerability buff being added (I believe it is also added when you leave the base?).
This is a fantastic suggestion! I'll give it a try this coming week! Thank you!
  Reply With Quote