ASTERALua API documentation
Back to productRU

Events

Subscribe with astera.events.on(name, callback). The call returns a token. astera.events.off(name, token) removes one subscription; off(name) removes all subscriptions for that event.

Available events:

bomb_resolved;

player_hurt and player_killed are derived from the difference between two consecutive world snapshots. confirmed_hit uses the same confirmed source as Astera's hitmarker and hitsound. Events do not start a separate entity scan.

The snapshot events are useful for observing game-state changes, but they do not assert who caused the damage. Use confirmed_hit for a confirmed local hit.

astera.events.on("confirmed_hit", function(event)
    if event.killed then
        astera.log("Kill, damage: " .. event.damage)
    end
end)