LoL Event handling
'Events are sent to Java plugins that desire some form of continual or intermittant updates. Events are generated either by the core game code ("built-in events") or by other plugins ("Java triggered events").
Built-in Events
These events are generated by the core game package and any plugin may use 'wantEvent' to cause one of their methods to be called when the event happens.
- FirstFrame
- This event happens once and once only - on the very first frame of the actual game. Prior to that time, some models, and other plugins may not yet be loaded so it is illegal to do things like collision detection before the FirstFrame event has happened. Hence it is common to do at least some model initialisation in the FirstFrame event rather than in the plugins' constructor function.
- NextFrame
- This event happens at the start of every single frame.
- Keystroke
- This event occurs every time a key on the keyboard is pushed down. The event handler (as named in 'wantEvent') must take a single char parameter - which is the ASCII key that was struck.
- MouseClick
- This event occurs every time a mouse-button is clicked down. The event handler (as named in 'wantEvent') must take a single char parameter which is either the letter 'L', 'M' or 'R' depending on whether it was the left, middle or right button of the mouse that was clicked.
- Joystick0/Joystick1
- These events occur whenever a button is pressed on the specified joystick. The event handler (as named in 'wantEvent') must take a single char parameter - which is 'A' for the first button, 'B' for the second and so forth. The actual labelling of buttons on the physical joystick does not always match this scheme - so pressing the button labelled 'A' may or may not send an 'A' to the event handler. There is a wide variety of joystick labelling schemes which makes the selection of which button does which thing a tricky matter. Trial and error is recommended!
Java triggered events
These events are created inside one Java plugin and will be recieved by every other Java plugin that corresponds to a model that meets the criteria set in the event call. It is possible to send events to all other plugins, to only those within a certain range, or to those that fall within a certain angle of the front of this model.
As far as recieving those events, there is no difference between a Java event and a built-in event.
Wikiid Pages relating to Lemur of Lima (edit) |
Lemur of Lima - Main page |
Lemur of Lima - Controls |
Lemur of Lima - Levels : |
Lemur of Lima - Java Plugins :
|
Lemur of Lima - Source Code Documentation : |
Wikiid Pages relating to gameTools (edit) |
gameTools - Main page |
gameTools - Support Tools : |
gameTools - File Formats : |
gameTools - Source Code :
|