Extended Event Handlers (XEH) by Solus and Killswitch

This addon allows a virtually infinite amount of event handlers to be used together from different addons. The event handlers are executed for the matching class and all inheriting classes. The event handler init line also contains the extended event handler class to look for, so you can have a custom inheritance for custom units. 

Normally event handlers can only be added in configs, and trying to add a new event handler caused all previous event handlers to be overwritten, this addon allows that limitation to be overcome. This is mostly useful for having addons that can add different functionality, for example in OFP addons that had their own event handlers wouldn't inherit default event handlers, such as a custom unit with EHs being used with ECP or FFUR wouldn't have the ECP or FFUR effects.


Other Extended Event Handlers by Killswitch

Adds extended event handlers for all events.


Extended Fired Event Handler

This allows a virtually infinite amount of fired event handlers to be used together from different addons.

The extended fired event handler has several different parts:

	First the extended init EH is run for all units to add together and compile all of the inherited fired event handlers and use setVariable to attach those to the unit.

	The extended fired event handler is added to the base class Extended_EventHandlers so that all of the cfgVehicles class EventHandlers inherit it. When a unit fires and sets off the event handler the shot is immediately captured in the same game state cycle. Then the compiled extended fired events are called by using getVariable to retrieve them from the unit.


The fired event handler init line contains the extended event handler class to look for, so you can have a custom inheritance for custom units. The event handlers are executed for the matching class and all inheriting classes.

It allows more fired events to be used together, for example a script that makes shots affected by wind and a tracer script could be used together.



Examples:
There are two example Extended Init addons included to demonstrate how to assign new event handlers and the event handler inheritance. The example pbos should not be installed except for testing.

There is an example addon included to demonstrate how to assign new fired event handlers and the event handler inheritance. The example also has a quickly called function that is able to capture information on the shot in the same game state cycle before the shot is updated and moves away from it's starting position and changes it's status. The example pbo should not be installed except for testing.


Note to addon makers: Make sure to add a ";" to the end of your extended init line to separate it from other extended inits. The Extended Init EH doesn't separate them automatically, so ending without one will result in an error.


XEH Change log:
1.0 Initial Release
Combined Extended Init, Fired, and Other event handlers. Thanks to Killswitch for combining them and adding the other extended event handlers!
Added signature and bikey.


Init EH Change log:
1.26
Fixed signature files, bikey, and .pbos.

1.25
Fixed signature files and added bikey.

1.2
Added signature file.
Fixed a bug that caused crashes on some missions. Thanks to LCD344!
Changed ExecVM to Call Compile. Thanks to UNN!

1.1
Fixed people in vehicles having no inits.
Included SightAdjustment example "bridge" addon that allows the GMJ_SightAdjustment addon to be used with other extended init event handler addons.

1.0 Initial Release


Fired EH Change log:
1.0 @ 12-09-07 Initial release
