Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| tmf:garrison [2016/07/26 09:17] – head | tmf:garrison [2025/08/03 14:24] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Garrison ====== | ====== Garrison ====== | ||
| - | {{: | ||
| - | [[#headless client support|{{: | ||
| - | Garrison works with the [[tmf: | ||
| - | Each unit [[tmf:sync|synced]] to the garrison module will become possible unit to be spawned inside the area. | + | [[# |
| - | If you want to increase | + | The garrison module can be used to spawn units inside buildings in a garrisoned state (will remain standing and not leave their post). The positions are chosen randomly at mission start (or trigger activation if a trigger is synced). Building positions will be selected inside |
| + | Each unit [[: | ||
| - | The Garrison module works with triggers or without. | ||
| ===== Usage ===== | ===== Usage ===== | ||
| - | {{: | + | Put down the module and adjust the module area to contain buildings you intend the AI to spawn in. |
| + | {{: | ||
| + | |||
| + | Configure the module options to set the number of AI to spawn inside buildings and whether the AI should hold their position. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Example of the spawned AI: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | You can also sync TMF Area modules to the Garrison module to expand the area of building selection. | ||
| + | |||
| + | {{: | ||
| ===== Trigger support ===== | ===== Trigger support ===== | ||
| + | |||
| The garrison module can be activated once by a trigger. | The garrison module can be activated once by a trigger. | ||
| - | Simply sync the trigger to the module and when activate the garrison module will activate. | + | Simply |
| ===== Headless client support ===== | ===== Headless client support ===== | ||
| - | By [[tmf: | ||
| - | The module will spawn the units on the [[tmf: | + | By [[: |
| + | |||
| + | The module will spawn the units on the [[:tmf: | ||
| + | |||
| + | ===== API - retrieve spawned units ===== | ||
| + | |||
| + | The units spawned by the garrison module can be retrieved with the following code: | ||
| + | <code cpp> | ||
| + | module getVariable " | ||
| + | </ | ||
| + | Example usage: Re-enabling the movement of the AI. | ||
| + | //This code can be placed in a trigger on activation to enable the units to move again (assumes the garrison module is called garrison_1).// | ||
| + | <code cpp> | ||
| + | {_x enableAI " | ||
| + | </ | ||