🎮game_event_t

Describes a game event.

get_name

Returns the event name.

Arguments

None.

Returns

Type

Description

string

Event name.

Example

if event:get_name() == 'player_hurt' then
    -- ...
end

get_bool

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

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

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

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

Returns the controller by key.

Arguments

Name

Type

Description

key

string

Entry key.

Returns

Type

Description

Example

event:get_controller('userid');

get_pawn_from_id

Returns the pawn by key.

Arguments

Name

Type

Description

key

string

Entry key.

Returns

Type

Description

Example

event:get_pawn_from_id('userid');

Last updated