Armed Assault Info
ArmA | ArmA 2 | ArmA 3

  XEH Extended EventHandlers (v 1.93)  
Picture of XEH Extended EventHandlers Author : Solus
Version : 1.93 Era : Modern Type : Misc
Size : 26 KB Demo mission : No
Downloads : 15554 Rating : 4.4 / 5 (rated 5 times)

You must register before rating items.

Included *.pbo files : Needed addons :
  • Extended_EventHandlers.pbo
Description :
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.93 (Feb 16, 2009)
Fixed: empty vehicles created after the mission started did not get their
InitPost handlers called...

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")

Size : 26 KB
  February 9th, 2009 - 21:46   Comment (0)  

© 2007 - 2021 Armed Assault Info
Disclaimer - Info