-
Notifications
You must be signed in to change notification settings - Fork 14
Custom Game Events
-----------------------------------------------------------------------------
🚧 Warning: This page is under construction and has incomplete information!
-----------------------------------------------------------------------------
OCAP2 supports the addition of calls to integrated functions that will add custom events to the Events feed during playback, alongside kills/connection events.
To record a custom event, we use a CBA server event handler containing a Type along with a Message.
["ocap_handleCustomEvent", ["eventType", "eventMessage"]] call CBA_fnc_serverEvent;[Result image x 2 as examples]
type of string
This can be either a side like "WEST", "EAST" (from str side _unit) or a hex code like #a2b3c4
Introduced in v1.0.0, deprecated
A special event type can be used in Capture the Flag matches to indicate when someone picks it up or drops it.
["ocap_handleCustomEvent", ["capturedFlag", [name _unit, playerSide _unit, flagSide]] call CBA_fnc_serverEvent;Needs updated w/ new coloration system in 1.0.0
[Result image x 2 as examples]
Introduced in v1.1.0
Event to show a terminal hack has started.
Variables:
- string, unit name
-
color (optional, default:
""), unit color -
color (optional, default:
""), terminal icon color -
string (optional, default:
""), terminal identifier (needed forterminalHackCanceledorTBD) -
position (optional, default:
nil), terminal position (needed to show the "active hack" location on the map) -
number (optional, default:
0), count down until hack will be completed, if position is present the marker on the map will disappear once it ran out.
[Result image x 2 as examples]
Introduced in v1.1.0
Event to update the previous terminalHackStarted event
Variables:
- string, unit name
-
color (optional, default:
""), unit color -
color (optional, default:
""), terminal icon color -
string, terminal identifier (needed to control
terminalHackStarted) -
string, state (
"interrupted"to stop it and mark it as failed)
[Result image x 2 as examples]