Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Events

Data Structures

class  BaseEventHandler
 
class  EventHandlerManagerComponentClass
 

Functions

EventHandlerManagerComponentClass GameComponentClass RaiseEvent (string eventName, int argsCount, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
 
proto void RegisterScriptHandler (string eventName, Managed inst, func callback, bool delayed=true, bool singleUse=false)
 
proto void RemoveScriptHandler (string eventName, Managed inst, func callback, bool delayed=true)
 
proto external int GetEventHandlers (out notnull array< BaseEventHandler > outEventHandlers)
 Returns a list and count of all event handlers. More...
 

Detailed Description

Function Documentation

◆ GetEventHandlers()

proto external int GetEventHandlers ( out notnull array< BaseEventHandler outEventHandlers)

Returns a list and count of all event handlers.

◆ RaiseEvent()

EventHandlerManagerComponentClass GameComponentClass RaiseEvent ( string  eventName,
int  argsCount,
void  param1 = NULL,
void  param2 = NULL,
void  param3 = NULL,
void  param4 = NULL,
void  param5 = NULL,
void  param6 = NULL,
void  param7 = NULL,
void  param8 = NULL,
void  param9 = NULL 
)

Supported and tested argument types when raising event in script with handler in gamecode:

  • int, float, bool
  • string in script, enf::CStr in code
  • vector in script, enf::Vector3* in code
  • Instance in script, pointer in code (BaseWeaponComponent -> BaseWeaponComponent*)
  • array<float/ int/ string/ vector>, others not tested, but should work, pointer in code (array<float> -> enf::ArrayFloat*)

The execution of the callbacks itself will be delayed, therefore it is necessary that any instances passed in will still exist at least until the next frame, and their state does not change (or, if it does change, that this change is expected by the callback, as it will be propagated).

  • basic types - int, float, bool are copied by value and thus safe.
  • string is copied by value, but contains a pointer to the string that has reference counting.
  • vector and arrays have only their pointers copied, so they behave the same as instance.

◆ RegisterScriptHandler()

proto void RegisterScriptHandler ( string  eventName,
Managed  inst,
func  callback,
bool  delayed = true,
bool  singleUse = false 
)

◆ RemoveScriptHandler()

proto void RemoveScriptHandler ( string  eventName,
Managed  inst,
func  callback,
bool  delayed = true 
)