-
Notifications
You must be signed in to change notification settings - Fork 5
SetBuildingWorkarea
Set the work area for a building. This is the same event that players can issue by clicking the target icon in the side panel of a selected building.
BOOL ISettlers4Api::SetBuildingWorkarea(
DWORD building,
INT x,
INT y,
DWORD player
);
building
The index of the building to change the work area. The player should own this building.
x
This is the x coordinate on the map for the center of the new work area.
y
This is the y coordinate on the map for the center of the new work area.
player
The player who issues the command. Use 0 (zero) to issue this event as the local player.
If this method could append the event successfully it will return TRUE. If an error occurred it will return FALSE.
The corresponding network event id of the command is ID 5001.
The work area must not lie in the players territory. You can use it to set the gathering point of barracks outside of the players territory.
Minimum API Level | 1 |
Target Edition | Any |
Header | S4ModApi.h |
Library | S4ModApi.lib |
DLL | S4ModApi.dll |