Skip to content
nyfrk edited this page Feb 3, 2022 · 2 revisions

ISettlers4Api::BuildBuilding method

Start a building on a specified position. This is the same event that is issued when the player starts a building.

Syntax

BOOL ISettlers4Api::BuildBuilding(
	S4_BUILDING_ENUM buildingType, 
	INT x, 
	INT y,
	DWORD player
);

Parameters

buildingType

The building type you want to start the building. See S4_BUILDING_ENUM for a list of possible building types.

x

This is the x coordinate on the map for this building.

y

This is the y coordinate on the map for this building.

player

The player who issues the command. Use 0 (zero) to issue this event as the local player.

Return value

If this method could append the event successfully it will return TRUE. If an error occurred it will return FALSE.

Remarks

The corresponding network event id of the command is ID 5025.

Requirements

Minimum API Level 1
Target Edition Any
Header S4ModApi.h
Library S4ModApi.lib
DLL S4ModApi.dll

See also

ISettlers4Api

ISettlers4Api::StartBuildingPlacement

ISettlers4Api::CrushBuilding

Clone this wiki locally