Skip to content

on_game_event(ev)

Type Name Description
event ev Event

Called when any game event is being fired.

1
2
3
4
5
6
7
8
9
function on_game_event(ev)
    if ev:get_name() == 'player_hurt' then
        -- do smth
    end
end

function on_player_hurt(ev)
    -- same as example above
end