Skip to content
nyfrk edited this page Aug 29, 2020 · 1 revision

ISettlers4Api::UnGarrisonWarriors method

Ungarrison a building. This makes a military building eject units.

Syntax

BOOL ISettlers4Api::UnGarrisonWarriors(
	DWORD building, 
	INT column,
	BOOL bowman,
	DWORD player
);

Parameters

building

The index of the building to garrison. The player should own this building. Usually this is a military building like a guard tower.

column

The column of the unit to eject. Use 0 (zero) to eject the leftmost unit (in regards to the side panel of the selected building) . Use -1 to eject as much units as possible. This value is usually in the range -1..5.

bowman

If TRUE a bowman is ejected. Otherwise a swordman is ejected. This parameter is ignored if column is -1.

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 5032.

Requirements

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

See also

ISettlers4Api

ISettlers4Api::GarrisonWarriors

Clone this wiki locally