-
Notifications
You must be signed in to change notification settings - Fork 5
AddSettlerSendListener
Register a settler send listener whose callback will be called whenever the player commands warriors or other units.
S4HOOK ISettlers4Api::AddSettlerSendListener(
LPS4SETTLERSENDCALLBACK lpCallback
);
lpCallback
A function pointer to the callback function. This must not be NULL. See S4SettlerSendProc for implementation details of this procedure.
If the registration of the callback failed NULL is returned.
If the method succeeds it will returns a S4HOOK handle. Pass the S4HOOK to the ISettlers4Api::RemoveListener method to remove the callback from the chain when you do not need it anymore.
All hooks must be removed with ISettlers4Api::RemoveListener before terminating the application.
When registering the callback is appended to the end of the callback chain, meaning that the callback will be processed on a first come first serve basis. If your callback is not called it may be due to another mod that consumes it and thus skips the subsequent callbacks.
The corresponding network event id of the movement command is ID 5014.
Minimum API Level | 1 |
Target Edition | Any |
Header | S4ModApi.h |
Library | S4ModApi.lib |
DLL | S4ModApi.dll |