Jump to content

Photo
- - - - -

Extended eventhandlers

xeh

  • Please log in to reply
214 replies to this topic
Thread Starter
Solus
Solus

    Staff Sergeant

  • Members
  • 268 posts

Posted 31 December 2007 - 02:57 #1

Latest version: 1.7 @ Mar. 16 2008

Extended Event Handlers (XEH) by Solus and Killswitch

Combines Extended Init, Fired, and other event handlers into a single addon. Thanks to Killswitch for combining them and adding the ability to use extended event handlers for all events! Includes working signature and key. The cfgPatch names are backwards compatible with addons made for the Extended Init and Fired EH addons. The previous addons should be removed, but shouldn't have any problems if present.

Downloads:
XEH Version 1.7:
Extended EventHandlers 1.7 @ ArmedAssault.info

Extended EventHandlers 1.7 @ Armaholic.com

Extended EventHandlers 1.7 @ ofp-zeus.com


Change log:
1.7
Fixed: Removed XEH from class Static, which stops ArmA from crashing to desktop
when resuming saved games.

1.6
Fixed: The "exclude" property will apply to the specified class(es) and all
subclasses thereof.

1.5
Added: Composite ("inner") XEH classes can have an extra property, "exclude"
which is either a string or an array of strings with the class name(s)
of vehicles that should *not* get a particular XEH event handler.

1.4
Added: "Static" class vehicles can now have XEH event handlers.
Added: A respawn monitor that restores non-init XEH event handlers after
the player respawns. Many thanks to Sickboy, LoyalGuard and ViperMaul for
the initial research and suggestions!

Version 1.3
Added: The ability to use "nested" XEH classes with a "scope" feature
to limit certain event handlers to objects of specific classes.

1.2
Fixed: SightAdjustment_AutoInit.
Fixed: Extended Dammaged EventHandler.

1.1
Fixed: XEH can now handle extended event handlers that are missing a trailing
semicolon.
Fixed: the example addons now require the Extended_Eventhandlers addon
instead of the two older ones. Also, the debug sideChats are now guaranteed
to be seen when previewing a mission with the example addons loaded.
Fixed: XEH init EH:s are now actually being called on units inside vehicles.


Description:
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.


More can be read at the previous thread:
http://www.flashpoin...-bin....89;st=0

Thanks to Mr Groch for testing!

Thanks to ofp-zeus.com, Armaholic.com, AssaultMissionStudio.de, Combat-Prison.net, and ArmedAssault.info for hosting!

License: XEH can be included in other releases either as the original archive or as the extracted files, preferably with the readme to help explain things. Modified versions can be released to add features or fix bugs or compatibility issues, but it should be signed and should retain backwards compatibility. Killswitch handles the SLX_XEH key and can check the code and sign new versions, although a new key can be used if necessary.





DMarkwick
DMarkwick

    Major

  • Members
  • 7298 posts

Posted 31 December 2007 - 04:06 #2

Aha, a final event handling solution Posted Image thanks very much to all involved.

So this works right off the bat, no changes needed to any existing addons right?
Feel like ArmA is letting you down in some way? Watch this:
https://www.youtube....h?v=Fh3webkCo4Y

nubbin77
nubbin77

    Gunnery Sergeant

  • Members
  • 465 posts

Posted 31 December 2007 - 04:48 #3

Awesome

Pillage
Pillage

    Sergeant

  • Members
  • 156 posts

Posted 31 December 2007 - 05:00 #4

I'm not an addon maker but I am aware of the benefit this addon is to the community. Good work Solus & Killswitch.

big
big

    Master Sergeant

  • Members
  • 742 posts

Posted 31 December 2007 - 06:11 #5

Armaholic.com mirror:

Extended eventhandlers (xeh)
Armaholic.com Admin.

Deadeye
Deadeye

    Master Sergeant

  • Members
  • 602 posts

Posted 31 December 2007 - 11:25 #6

ArmedAssault.info Mirror :

http://www.armedassa...ex.p....lang=en
ArmedAssault.info, everything you need for Armed Assault
Posted Image
Join our Team, click here for more information

Dwarden
Dwarden

    BI Developer

  • 9647 posts
  • LocationBrno, Czech Republic

Posted 31 December 2007 - 11:34 #7

Fantastico ... Posted Image

RealTimeChat ~ARMA2 in Your browser (w/o Java), RealTimeChat ~ARMA3 in Your browser (w/o Java),
irc.GameSurge.net/ARMA2 (external IRC clients) irc.GameSurge.net/ARMA3 (external IRC clients)
ARMA 3 Feedback Tracker: http://feedback.arma...y_view_page.php
~100k fans @STEAM ARMA 2 + ARMA 2: OA + ARMA 3: + ~2k @XFIRE A2:OA
Follow my Twitter: http://twitter.com/FoltynD or my Facebook http://facebook.com/FoltynD


VictorFarbau
VictorFarbau

    Gunnery Sergeant

  • Members
  • 552 posts

Posted 31 December 2007 - 13:55 #8

@Solus, a quick note. The examples include config.cpp files that still state
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> requiredAddons[] = {"Extended_Init_EventHandlers","Extended_Fired_EventHandlers"};[/QUOTE]

I changed that to just "Extended_EventHandlers" in my config.cpp which works fine.

Cheers,
VictorFarbau

william1
william1

    Sergeant Major

  • Members
  • 1410 posts

Posted 31 December 2007 - 14:34 #9

will there be conflict if i put this PBO along with the version 1.26 ? many addons require to have the anterior version in their requiredaddons line





VictorFarbau
VictorFarbau

    Gunnery Sergeant

  • Members
  • 552 posts

Posted 31 December 2007 - 14:54 #10

@william1 - I guess you should not keep the old versions. XEH also defines the required classes so "old" addons should work. At least it worked in a quick test for me (VFAI requiring "Extended_Init_Eventhandlers" still worked fine). It's apparently more a cosmetic matter in the examples of XEH.

Cheers,
VictorFarbau

Q1184
Q1184

    Staff Sergeant

  • Members
  • 341 posts

Posted 31 December 2007 - 14:58 #11

Yes, from my tests it works fine with addons that require Extended_Init_Eventhandlers and Extended_Fired_Eventhandlers. Thanks Solus for including backwards compatibility.
ACE/ACE2 dev

william1
william1

    Sergeant Major

  • Members
  • 1410 posts

Posted 31 December 2007 - 15:00 #12

ah OK , thanks Posted Image

Lee_H._Oswald
Lee_H._Oswald

    Chief Warrant Officer

  • Members
  • 3240 posts

Posted 31 December 2007 - 15:13 #13

A final version, great!

I was a bit confused by all the eventhandler addons with different names/etc.

Thanks!


MfG Lee Posted Image

.kju -PvPscene-
.kju -PvPscene-

    Brigadier General

  • Members
  • 12275 posts

Posted 31 December 2007 - 17:53 #14

Sincere thanks to Solus and especially Killswitch to sort that one out.
Top notch stuff! Posted Image



Current active projects: None :(

Maintained/assisted projects: IFA3, Blitzkrieg


Help: Got a crash? Report it! What is the RPT log file?


Dwarden
Dwarden

    BI Developer

  • 9647 posts
  • LocationBrno, Czech Republic

Posted 31 December 2007 - 18:58 #15

Warning Message: Script Extended_Init_EventHandlers\Init.sqf not found

seems like some addon(s) got issue vs backward compatibility

guess this should fix it (it was one from Examples )

from examples SightAdjustment_AutoInit.pbo\config.cpp

init="[_this select 0,""Extended_Init_EventHandlers""] execVM ""\Extended_Init_EventHandlers\Init.sqf""";

to

init="[_this select 0,""Extended_Init_EventHandlers""] execVM ""\Extended_EventHandlers\Init.sqf""";

Edited by W0lle, 16 April 2009 - 03:07.

RealTimeChat ~ARMA2 in Your browser (w/o Java), RealTimeChat ~ARMA3 in Your browser (w/o Java),
irc.GameSurge.net/ARMA2 (external IRC clients) irc.GameSurge.net/ARMA3 (external IRC clients)
ARMA 3 Feedback Tracker: http://feedback.arma...y_view_page.php
~100k fans @STEAM ARMA 2 + ARMA 2: OA + ARMA 3: + ~2k @XFIRE A2:OA
Follow my Twitter: http://twitter.com/FoltynD or my Facebook http://facebook.com/FoltynD


Pillage
Pillage

    Sergeant

  • Members
  • 156 posts

Posted 31 December 2007 - 21:29 #16

After d/loading this I removed v1.26 and replaced with this version but it results in the error Dwarden posted constantly after every mission load/unload.
[quote name='(Dwarden @ Jan. 01 2008,05:58)']Warning Message: Script Extended_Init_EventHandlers\Init.sqf not found[/QUOTE]
However by replacing the v1.26 files the error no longer occurs, which I can only assume has something to do with what VictorFarbau posted...
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> requiredAddons[] = {"Extended_Init_EventHandlers","Extended_Fired_EventHandlers"};[/QUOTE]

I'm happy just to leave these additional files in my addons folder if it fixes this error but if they're meant to have been superseded I'd prefer to be able to get rid of them.

Dwarden
Dwarden

    BI Developer

  • 9647 posts
  • LocationBrno, Czech Republic

Posted 31 December 2007 - 23:34 #17

tried my fix ?

RealTimeChat ~ARMA2 in Your browser (w/o Java), RealTimeChat ~ARMA3 in Your browser (w/o Java),
irc.GameSurge.net/ARMA2 (external IRC clients) irc.GameSurge.net/ARMA3 (external IRC clients)
ARMA 3 Feedback Tracker: http://feedback.arma...y_view_page.php
~100k fans @STEAM ARMA 2 + ARMA 2: OA + ARMA 3: + ~2k @XFIRE A2:OA
Follow my Twitter: http://twitter.com/FoltynD or my Facebook http://facebook.com/FoltynD


Pillage
Pillage

    Sergeant

  • Members
  • 156 posts

Posted 01 January 2008 - 00:48 #18

No...



...Tried and fixed, thanks Dwarden.

Thread Starter
Solus
Solus

    Staff Sergeant

  • Members
  • 268 posts

Posted 01 January 2008 - 01:05 #19

Here's a fixed SightAdjustment bridge addon:
http://files.filefro...htAd....fo.html

There were some other problems that were fixed too- the fired and other EH events weren't used for people.

Dwarden
Dwarden

    BI Developer

  • 9647 posts
  • LocationBrno, Czech Republic

Posted 01 January 2008 - 16:52 #20

i'm unable to download from filefront ... constant

Quote[/b] ]There was an error processing your request; it appears to be invalid or there was an error with your conection. Please wait while your request is retried...


or file key error or else ...

in past 3 months FileFront service turned to be absolutely useless (it's getting worse and worse)

can someone host it on different mirror ? File Factory ? Media Fire ? whatever else Posted Image

RealTimeChat ~ARMA2 in Your browser (w/o Java), RealTimeChat ~ARMA3 in Your browser (w/o Java),
irc.GameSurge.net/ARMA2 (external IRC clients) irc.GameSurge.net/ARMA3 (external IRC clients)
ARMA 3 Feedback Tracker: http://feedback.arma...y_view_page.php
~100k fans @STEAM ARMA 2 + ARMA 2: OA + ARMA 3: + ~2k @XFIRE A2:OA
Follow my Twitter: http://twitter.com/FoltynD or my Facebook http://facebook.com/FoltynD




Also tagged with one or more of these keywords: xeh