-
Notifications
You must be signed in to change notification settings - Fork 5
S4SettlerSendProc
An application-defined or library-defined callback function used with the ISettlers4Api::AddSettlerSendListener method. The library calls this function whenever the user is about to send warrior commands to the engine. It can be used to add new behavior to custom drawn overlays.
The LPS4SETTLERSENDCALLBACK type defines a pointer to this callback function.
HRESULT S4HCALL S4SettlerSendProc(
DWORD dwPosition,
S4_MOVEMENT_ENUM dwCommand,
LPVOID lpReserved
);
dwPosition
This is the target position on the map of this movement command. Use HIWORD to extract the y coordinate on the map and use LOWORD to extract the x coordinate on the map.
dwCommand
The dwCommand parameter is one of the following values.
Value | Description |
---|---|
S4_MOVEMENT_FORWARD 0 |
Forward Units will move towards a target and idle at the target. They will attack enemies on sight. |
S4_MOVEMENT_PATROL 1 |
Patrol Units will patrol between its current position and the target position. They will attack enemies on sight. |
S4_MOVEMENT_ACCUMULATE 2 |
Accumulate The position will be appended to the units target list. After reaching its current target it will go to the next. It will idle at the last target of the list. They will attack enemies on sight. |
S4_MOVEMENT_WATCH 4 |
Watch Units will move towards a target and idle at the target. They will not attack enemies while moving towards the target. |
S4_MOVEMENT_STOP 8 |
Stop Stops the Units and makes them idle. They will attack enemies on sight. |
lpReserved
This parameter is reserved for future use. It should be ignored.
If you want to discard the event return TRUE. Otherwise return FALSE.
If the event is discarded the game will not process it. Other hooks down the chain will not get the chance to process the event.
The corresponding network event id is ID 5014.
Minimum API Level | 1 |
Target Edition | Any |
Header | S4ModApi.h |
Library | S4ModApi.lib |
DLL | S4ModApi.dll |