Bug #28648

XEH used in description.ext does not work for spawned units

Added by Xeno over 3 years ago. Updated almost 2 years ago.

Status:Closed Start date:02/13/2012
Priority:High Due date:
Assignee:Sickboy % Done:


Target version:v1.0.0
Component: Affected Version:
Close Reason:


I was able to reproduce with just CBA and no other addons what Dimitriv_Harkov wrote in BIF, XEH added in description.ext do not trigger for spawned units only for editor placed ones.
See: http://forums.bistudio.com/showthread.php?103871-CBA-Community-Base-Addons-for-A2-OA-and-CO&p=2105412&viewfull=1#post2105412

I think we should also check if normally added XEHs (via addon config) still work for spawned units.

eh_spawned_test.Desert_E.7z (1 kB) Xeno, 02/13/2012 00:42

cba_extended_eventhandlers.pbo (266.5 kB) Sickboy, 02/13/2012 07:33

Related issues

related to ARMA2 Community Issue Tracker - Bug #28652: Config Init eventhandlers ran too early for dynamically s... Assigned 02/13/2012

Associated revisions

Revision 470e99c7
Added by Sickboy over 3 years ago

~ FIXED: Spawned units do not get their eventhandlers properly ran. refs #28648

Revision 470e99c7
Added by Sickboy over 3 years ago

~ FIXED: Spawned units do not get their eventhandlers properly ran. refs #28648


Updated by Xeno over 3 years ago

Simple test mission, start and wait till a second unit is spawned (5 seconds).
Then shoot the second unit (the spawned one), check RPT, nothing.
Shoot the editor placed unit, check RPT and you'll find the expected XEH killed EH RPT entries.

Updated by Sickboy over 3 years ago

  • File cba_extended_eventhandlers.pbo added
  • Status changed from New to In progress
  • Assignee set to Sickboy
  • Target version set to v1.0.0
  • % Done changed from 0 to 70

Should be solved in this pbo.

The problem is that the eventhandlers again are not firing consequently after the unit is fully ready.
This time for createUnited units. Unsure if this is new in the latest betas or was already the case in 1.60.

[1535,49.972,0,"init",[<No group>:0 (USMC_Soldier)]]
[2248,64.322,5.624,"init",[f6c24080# 1867: usmc_soldier.p3d]]

Notice the 3rd unit runs its init handler too soon and he's referred to just by model name still.

Will inform CIT again.

Updated by Dimitri_Harkov over 3 years ago

I can confirm that this works now with latest beta, CBA and no other mods.
Thanks for the quick fix.

There seem to be problems with this and ACRE, however.
When I ran the repro-mission with ACRE added, the log would contain both messages (i.e.: the events fired on both), but the radio would still be on the dead body of the spawned unit.

Looks like ACRE is faster in swapping the itemRadio for it's own unique radio class than CBA can remove it, but that's a pure ACRE-related problem I guess, not CBA's.


Updated by Sickboy over 3 years ago

  • % Done changed from 70 to 90

Thanks for confirmation Dimitri, I have posted a CIT ticket on the issue: #28652

Re the ACRE radio; config eventhandlers take precedence over mission eventhandlers at this time.
If you feel this should be different, please create a separate ticket with motivations.

You might try overriding the ACRE eventhandlers in a config, so you can execute your code first and then execute acre's code from your code, or maybe if you use the same eventhandler classname as ACRE you might override their config eh from description.ext - not sure now.

Updated by killswitch almost 2 years ago

  • Status changed from In progress to Closed

Confirmed fixed way back in the year 2012. Closing.

Also available in: Atom PDF