Hooks🔗
Using the Hooks Library you can attach code to certain events in the game. This allows you to run custom code when certain things happen in the game.
A function registered to a hook will execute when that event occurs. The typical pattern involves:
This ensures that custom logic runs at the appropriate time.
You can find all the hooks in Hooks section of the documentation.