Events

Getting Started

Events

This framework replaces addhook function with sea.addEvent which is not only for hooks but also key controls. Meaning you do not need to use "key" hook.

sea.addEvent takes three parameters:

  • Event name
  • The function you want to tie to the event
  • Priority

Event names might be different than you think. If you want to add a hook, you would basically go such as "onHookStartround", "onHookJoin", "onHookKill" and so on. Or, to tie a event to a key upon press; "onPressSpace", "onPressMyControl", or upon release; "onReleaseSpace", "onReleaseControlName". However, in order key controls to work, the player controls should be configured accordingly.