-
Notifications
You must be signed in to change notification settings - Fork 16
Wave Start and Wave End Events
Functions\Waves\fn_startWave.sqf (BLWK_fnc_startWave)
Functions\Waves\fn_endWave.sqf (BLWK_fnc_endWave)
As of 0.9, there are now scripted eventhandlers for the start and end of wave. This opens opportunities to execute code on a wave's start or end. These are remoteExec'd onto all machines (but not JIP). They are located in the missionNamespace
.
The event names are:
BLWK_onWaveStart
BLWK_onWaveEnd
You can review the relevant files above for their exact execution position within the file, but in general, they are the last item called.
To use the events, simply add a scripted eventhandler with Bohemia's function BIS_fnc_addScriptedEventHandler
. Don't forget to also remove the event with BIS_fnc_removeScriptedEventHandler
if it is no longer relevant as it will continue to be called.
Examples:
myEventId = [missionNamespace,"BLWK_onWaveStart",{hint "a wave has started"}] call BIS_fnc_addScriptedEventHandler;
[missionNamespace,"BLWK_onWaveStart",myEventId] call BIS_fnc_removeScriptedEventHandler;
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/ScriptedEventHandlers