marius00 / iagd

MIT License
108 stars 33 forks source link

How does IA detect when the player is close to the stash? #113

Closed recursivelftr closed 3 years ago

recursivelftr commented 3 years ago

I am creating a GD mod and would like to know how to tell when the player is not on the title screen and has loaded a character to play. I assume I could do it in a similar method as what IA does to tell if the player is close to the stash.

How can I go about this, and what part of the IA source code performs this action?

Thank you.

marius00 commented 3 years ago

If you check the IA DLL, IA detects when the player opens and closes the stash. IA also detects the player position, so if a player has opened/closed the stash, IA calculates the player position based on where he opened/closed the stash.

If the stash has not been opened or closed yet, IA marks the stash status as unknown and refuses to function.