2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2016-05-30 16:37:03 +00:00
|
|
|
/*
|
|
|
|
* Author: jaynus
|
|
|
|
* Call and propegate a synced event
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Name <STRING>
|
|
|
|
* 1: Arguments <ARRAY>
|
|
|
|
* 2: TTL <NUMBER, CODE> [Optional] for this specific event call
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Boolean of success <BOOL>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* ["bob", [args], 5] call ace_common_fnc_syncedEvent
|
|
|
|
*
|
2016-05-30 16:37:03 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_name", "_args", ["_ttl", 0]];
|
|
|
|
|
2021-10-10 16:55:14 +00:00
|
|
|
if !(_name in GVAR(syncedEvents)) exitWith {
|
2024-02-05 17:04:24 +00:00
|
|
|
ERROR_1("Synced event key [%1] not found (syncedEvent)",_name);
|
2016-05-30 16:37:03 +00:00
|
|
|
false
|
|
|
|
};
|
|
|
|
|
|
|
|
private _eventData = [_name, _args, _ttl];
|
|
|
|
|
2016-06-09 12:24:45 +00:00
|
|
|
["ACEe", _eventData] call CBA_fnc_globalEvent;
|