Extended eventhandlers (xeh)
Solus & 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.
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 called Extended_EventHandlers so that all 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.
Extract the pbo(s) in your Arma/addons folder or as we always recommend use a modfolder.
If you do not know how to use mod folders have a loom in our FAQ.
Empty vehicles created after the mission started did not get their
InitPost handlers called.
Init EH Change log:
- Fixed signature files, bikey, and .pbos.
- BI forums
Tags: No tags