Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| tmf:wavespawner [2016/07/26 09:20] – [Wave spawner] head | tmf:wavespawner [2025/08/03 14:24] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Wave spawner ====== | ====== Wave spawner ====== | ||
| [[#headless client support|{{: | [[#headless client support|{{: | ||
| - | The wave spawner is a powerful tool for a wide variety of reason. | + | |
| + | 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 21: | 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, | ||
| + | </ | ||