Skip to content

Instantly share code, notes, and snippets.

@pajlada
Created September 15, 2014 23:41
Show Gist options
  • Save pajlada/23ba84ebc20fd54654b5 to your computer and use it in GitHub Desktop.
Save pajlada/23ba84ebc20fd54654b5 to your computer and use it in GitHub Desktop.
on_event example
-- Available events:
-- 0 = Player die
-- 1 = Enemy die
-- 2 = Interactive Destroy
-- 3 = Player respawn
-- 4 = Click down (still available, although on_input is more useful)
-- 5 = Click up (still available, although on_input is more useful)
-- 6 = Absorber or Mini absorber absorbed something
-- 7 = Level Completed
-- 8 = Game Over
function on_event(event_id)
game:message('received event with id ' .. event_id)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment