Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tmf:wavespawner [2016/07/23 16:34] – created head | tmf:wavespawner [2025/08/03 14:24] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Wave spawner ====== | ====== Wave spawner ====== | ||
| - | The wave spawner is a powerful tool for a wide variety of reason. | + | [[#headless client support|{{: |
| + | |||
| + | The wave spawner is a powerful tool for a wide variety of reason. Any units that are synced to the wave spawner will be replicated when the wave spawner activates. When the mission loads they will be deleted and data on them stored (loadouts and waypoints). | ||
| The wave spawner works with triggers or without. | The wave spawner works with triggers or without. | ||
| Line 12: | Line 14: | ||
| The wave spawner requires one or more [[tmf: | The wave spawner requires one or more [[tmf: | ||
| + | |||
| The entire group is used so you only need to sync one unit for each group. | The entire group is used so you only need to sync one unit for each group. | ||
| + | |||
| The groups waypoints will be replicated after spawn. | The groups waypoints will be replicated after spawn. | ||
| Line 18: | Line 22: | ||
| {{: | {{: | ||
| + | |||
| + | |||
| + | ===== API - Event handler ===== | ||
| + | |||
| + | ==== On wave spawn event ==== | ||
| + | You can add an event handler via the TMF function // | ||
| + | |||
| + | The parameters passed to the event handler is an array consisting of: [wave_index, | ||
| + | |||
| + | Example 1: Set all spawned units to move fast and free to engage any enemies. Perhaps for spawned reinforcements. | ||
| + | <code cpp> | ||
| + | [this,{ | ||
| + | private _groups = _this select 1; | ||
| + | { | ||
| + | _x setBehaviour " | ||
| + | _x setCombatMode " | ||
| + | _x setSpeedMode " | ||
| + | } forEach _groups; | ||
| + | }] call tmf_ai_fnc_addWaveHandler; | ||
| + | </ | ||
| + | |||
| + | Example 2: Handle the output in a seperately defined function. | ||
| + | <code cpp> | ||
| + | [this, | ||
| + | </ | ||