New Official Bohemia Interactive have been moved to a new address: http://forums.bistudio.com/.
This old forum has been switched to read only status and will be removed soon.
For Registered users: please, pay attention to this User Account Recovery manual which will help you reactivate your original user account at the new official forums engine. See you there!

Forum rules

» Welcome Guest
[ Log In :: Register ]

Pages: (14) < ... 9 10 11 12 13 [14] >

[ Track this topic :: Email this topic :: Print this topic ]

Topic: Extended eventhandlers, (xeh) all combined into one addon< Next Oldest | Next Newest >

Dwarden Offline

Arma/OFP Fan



Group: Moderator
Posts: 2599
Joined: Mar. 2002
Posted: Sep. 22 2008,01:37

Quote (i0n0s @ Sep. 22 2008,02:09)
displayEH exists: http://www.ofpec.com/forum/index.php?topic=31384.0
But sadly not in XEH because of missing response to PM.

which is exactly what i was talking about :)

--------------
RealTimeChat about ArmA2 in Your browser
I support
*** ~20 millions users on STEAM,GamersGate& Impulse& GameTap are waiting for ArmA & ArmA2! *** Discuss ArmA2@IRCjoin #ArmA2@irc.GameSurge.net *** ArmA2 SteamCommunityGroup ***
Back to top
Profile PM ICQ MSN 

Doomguy Offline

..



Group: Members
Posts: 179
Joined: Sep. 2008
Posted: Jan. 09 2009,11:00

Hi!

I have some XEH questions for the event handler experts here. Some missions, for instance Warfare, use event handlers to implement functionality like scoring and clean up. The event handlers are added by scripts that call addEventHandler. I'm concerned that this might conflict with the XEH system of keeping track of event handlers.

Now, the question. Does the use of addEventHandler in scripts conflict with event handlers added by addons using XEH (let's say, ACE). If, for instance, an addon would use XEH to add a "killed" event handler to all objects of type Man, and my mission script would do addEventHandler ["killed", command] to an object of type Man, would both event handlers remain, or would one override the other?

If event handlers override each other in the situation above I would like to know how to make sure both event handler run. Can you add event handlers to the XEH system in mission scripts?

Thanks!

Doomguy out.
Back to top
Profile PM 

Wolfrug Offline

..



Group: Members
Posts: 538
Joined: July 2001
Posted: Jan. 09 2009,11:09

AFAIK normal eventhandlers added via script (like in your example) will NOT override config-based eventhandlers.

Which makes me curious...is a config-based eventhandler even considered when using removeEventhandler ID? (as in, CAN they be removed via script?). Hm hmm!

Regards,
Wolfrug


--------------

The old Lie:
Dulce Et Decorum Est
Pro Patria Mori
(Wilfred Owen, 1917)
Back to top
Profile PM WEB 

Doomguy Offline

..



Group: Members
Posts: 179
Joined: Sep. 2008
Posted: Jan. 09 2009,18:40

Quote (Wolfrug @ Jan. 09 2009,11:09)
AFAIK normal eventhandlers added via script (like in your example) will NOT override config-based eventhandlers.

Which makes me curious...is a config-based eventhandler even considered when using removeEventhandler ID? (as in, CAN they be removed via script?). Hm hmm!

Regards,
Wolfrug

You're right Wolfrug! I just ran some tests and indeed, both event handlers run. Cool!

Also, removeAllEventHandlers seems to remove the ACE event handlers, indeed.

Doomguy
Back to top
Profile PM 

Killswitch Offline

Member



Group: Members
Posts: 581
Joined: Mar. 2003
Posted: Feb. 09 2009,20:29

Hot on the heels of the recent A.C.E mod 1.02 release comes a new Extended Eventhandlers addon - version 1.92

Extended_Eventhandlers192.zip

This is the same version as the one XEH in ACE 1.02 and introduces a few new advanced features that have been cooking in the cauldrons of the deep dungeons of A.C.E. for some time. Please see the enclosed "readme" file for details of the new twins - PostInit and InitPost (*).

Credit for these two new features should go to Sickboy and the ACE team. Neat stuff, guys!

Here's an excerpt from the readme and changelog:
Quote
New in 1.91: PostInit and InitPost
==================================
Two new event handler types can be used to execute things at a later stage,
when all XEH init EH:s have run *and* all mission.sqm init lines have been
processed by ArmA. It happens just before the mission's "init.sqf" is executed.

The PostInit handler mirrors the pre-init event handler introduced in 1.9 and
will make a code snippet run *once* per mission. Example:

class Extended_PostInit_EventHandlers
{
   // Run "late_init.sqf" just before the mission's init.sqf and after
   // all other init EH:s and mission editor init lines have been processed
   SLX_MyAddon_postinit="[] execVM 'SLX_MyAddon\late_init.sqf";
};


The other event handler, InitPost type mimics the mission editor init lines in
that it will be run once on *every* unit and vehicle in the mission. You write
the InitPost EH just like you would the normal XEH init, fired etc handlers.
That means you have to wrap the handler in the desired vehicle/unit class for
which you want the InitPost EH applied. As an example, you could use this to
set a per-unit variable that's needed for your addon. It needs to be done for
all units that are derived from the CAManBase class. Here's how it would look:

class Extended_InitPost_EventHandlers
{
   class CAManBase
   {
       // Make sure everyone is happy when the mission starts
       SLX_MyAddon_init="_this setVariable ['slx_myaddon_ishappy', true]";
   };
};


XEH Change log
============
1.92 (Feb 09, 2009)
Changed: Some optimizations made (eg use pre-compiled XEH init functions).

       
1.91 (Dec 20, 2008) (Unofficial, for use with the ACE mod)
Added: New "post-init" feature that can be used to have a script run once
      at the end of mission initialisation, after all init EH:s and mission
      init lines have executed, but before the mission's init.{sqs,sqf}
      is processed.
Added: There's also a per-unit, "InitPost" XEH framework which lets you run
      scripts at the end of mission init. Unlike the PostInit event handlers
      described above, these snippets run once for every unit in the mission.
      (The name of this framework may change in the future to avoid confusion
      with "PostInit")
(*) Yes, I know... which one is which?  :whi:


Edited by Killswitch on Feb. 09 2009,20:33

--------------
"The confidence of ignorance will always overcome indecision of knowledge."
Back to top
Profile PM 

Q Offline

Wiggler of WGL



Group: Members
Posts: 3340
Joined: Oct. 2001
Posted: Feb. 09 2009,20:36

Cheers. Very useful indeed!

--------------
The seven roads to OAC

Former WGL5 MOD leader & dev  / Former ACE MOD leader & dev
PROPER MOD team leader & dev / OAC project manager

RIP Armed Assault Community Bugtracker - Sincere thanks to all who contributed to the ArmA CBT!

Please share your knowledge on this one:
Model data to judge ingame performance, What data is useful in ArmA?
Back to top
Profile PM 

Lee_H._Oswald Offline

Arma/OFP Fan



Group: Members
Posts: 2963
Joined: Jan. 2003
Posted: Feb. 09 2009,20:58

Thanks!


MfG Lee :)


--------------
Back to top
Profile PM 

Stavanger Offline

..



Group: Members
Posts: 738
Joined: April 2004
Posted: Feb. 10 2009,18:29

Mirror updated by ePrison.de

Extended Event Handlers (XEH) v1.92 by Solus&Killswitch

Regards,
Stavanger


--------------
EPrison.de
Back to top
Profile PM WEB ICQ 

Killswitch Offline

Member



Group: Members
Posts: 581
Joined: Mar. 2003
Posted: Feb. 16 2009,12:06

A new Extended Eventhandlers is ready - version 1.93: Extended_Eventhandlers193.zip

This one is the same as the one in the A.C.E. mod 1.03 patch and fixes the problem with "InitPost" event handlers not being executed on vehicles that are created after the mission starts. (See Create plane with script - all weapons show)

Changelog excerpt:
Quote
XEH Change log
============

1.93 (Feb 16, 2009)

Fixed: empty vehicles created after the mission started did not get their
        InitPost handlers called...


--------------
"The confidence of ignorance will always overcome indecision of knowledge."
Back to top
Profile PM 

Old Bear Offline

..



Group: Members
Posts: 410
Joined: Nov. 2006
Posted: Feb. 16 2009,12:34

New on front page at Armed Assault.info

Link to mirror :
XEH Extended EventHandlers (v 1.93)


--------------
Image Hosted by ImageShack.us
Back to top
Profile PM MSN 

El nino Foxhound Offline

..



Group: Members
Posts: 1238
Joined: June 2005
Posted: Feb. 16 2009,18:12

Latest version frontpaged at the Armaholic.com homepage.

The Armaholic.com download page can be found here:
http://www.armaholic.com/page.php?id=2605


--------------
Visit Armaholic.com

Public FTP available, just check the Armaholic.com FAQ.
Back to top
Profile PM WEB MSN 

Stavanger Offline

..



Group: Members
Posts: 738
Joined: April 2004
Posted: Feb. 16 2009,21:13

Mirror updated by ePrison.de

Extended Event Handlers (XEH) v1.93 by Solus&Killswitch

Regards,
Stavanger


--------------
EPrison.de
Back to top
Profile PM WEB ICQ 
205 replies since Dec. 31 2007,03:57 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (14) < ... 9 10 11 12 13 [14] >