tmf:garrison

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tmf:garrison [2016/07/26 09:09] – [Garrison] headtmf:garrison [2025/08/03 14:24] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Garrison ====== ====== Garrison ======
-{{:tmf:hcicon.png|}} {{:tmf:triggericon.png|}} 
  
-Garrison works with the [[tmf:area|area]] modules to spawn units inside buildings inside the [[tmf:area|area]].+[[#headless_client_support|{{:tmf:hcicon.png?nolink&}}]] [[#trigger_support|{{:tmf:triggericon.png?nolink&}}]]
  
-Each unit [[tmf:sync|synced]] to the garrison module will become possible unit to be spawned inside the area.+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 the area of the module. If you would like to add further areas you can syncronize [[:tmf:area|area]] modules to provide extra areas to be searched for building positions.
  
-If you want to increase the chance of a certain unit to spawn, [[tmf:sync|sync]] several versions of it.+Each unit [[:tmf:sync|synced]] to the garrison module will become a possible unit to be spawned inside the area. If you want to increase the chance of a certain unit to spawn, [[:tmf:sync|sync]] several versions of it. Note the module will also apply TMF loadouts or arsenal loadouts that are applied to the synced units.
  
- 
-The Garrison module works with triggers or without. 
 ===== Usage ===== ===== Usage =====
-{{:tmf:tmf_garrison_usage.png|}}+Put down the module and adjust the module area to contain buildings you intend the AI to spawn in. 
 +{{:tmf:garrison1.jpg?800}} 
 + 
 +Configure the module options to set the number of AI to spawn inside buildings and whether the AI should hold their position. 
 + 
 +{{:tmf:garrison2.jpg?800}} 
 + 
 +Example of the spawned AI: 
 + 
 +{{:tmf:garrison3.jpg?800}} 
 + 
 +You can also sync TMF Area modules to the Garrison module to expand the area of building selection. 
 + 
 +{{:tmf:tmf_garrison_usage.png?800}} 
 + 
 +===== Trigger support ===== 
 + 
 +The garrison module can be activated once by a trigger. 
 + 
 +Simply [[:tmf:sync|sync]] the trigger to the module and when activate the garrison module will activate. 
 + 
 +===== Headless client support ===== 
 + 
 +By [[:tmf:sync|syncing]] a headless client unit to the module. 
 + 
 +The module will spawn the units on the [[:tmf:headlessclient|HC]] instead. 
 + 
 +===== API - retrieve spawned units =====  
 + 
 +The units spawned by the garrison module can be retrieved with the following code: 
 +<code cpp> 
 +module getVariable "spawned_units" 
 +</code> 
 + 
 +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 "PATH"} forEach (garrison_1 getVariable "spawned_units"
 +</code> 
  • tmf/garrison.1469524190.txt.gz
  • Last modified: 2025/08/04 06:49
  • (external edit)