AddDefenders

Parameters
qtyinteger
idinteger
comment

Creates a group from already-existing units to guard the AI player town. The units assemble around the most important building in the town with no specific formation.

note

Important: in order to use this native, CreateCaptains must be called first or the game will crash. It is already called in the function CampaignAI found in common.ai.

patch

1.00

Source
common.ai (raise an issue to discuss on Github or submit a PR)
return type
boolean
Source code
native AddDefenders         takes integer qty, integer id               returns boolean