🎮game_event_t
Describes a game event.
get_name
Method
Returns the event name.
Arguments
None.
Returns
Type
Description
string
Event name.
Example
if event:get_name() == 'player_hurt' then
-- ...
endget_bool
Method
Returns the boolean value by key.
Arguments
Name
Type
Description
key
string
Entry key.
Returns
Type
Description
bool
Entry value. Returns false if such key was not found.
Example
event:get_bool('some_key');get_int
Method
Returns the integer value by key.
Arguments
Name
Type
Description
key
string
Entry key.
Returns
Type
Description
int
Entry value. Returns 0 if such key was not found.
Example
event:get_int('some_key');get_float
Method
Returns the float value by key.
Arguments
Name
Type
Description
key
string
Entry key.
Returns
Type
Description
float
Entry value. Returns 0.0 if such key was not found.
Example
event:get_float('some_key');get_string
Method
Returns the string value by key.
Arguments
Name
Type
Description
key
string
Entry key.
Returns
Type
Description
string
Entry value. Returns nil if such key was not found.
Example
event:get_string('some_key');get_controller
Method
If you pass a non-existent key into this function, the game might crash.
Returns the controller by key.
Arguments
Name
Type
Description
key
string
Entry key.
Returns
Type
Description
Controller.
Example
event:get_controller('userid');get_pawn_from_id
Method
Returns the pawn by key.
Arguments
Name
Type
Description
key
string
Entry key.
Returns
Type
Description
Pawn.
Example
event:get_pawn_from_id('userid');Last updated