Feature #11092

local Player-Only eventhandlers

Added by Sickboy about 7 years ago. Updated almost 7 years ago.

Status:Closed Start date:06/08/2010
Priority:Normal Due date:
Assignee:killswitch % Done:


Target version:v0.5.0 - OA
Component:extended_eventhandlers Affected Version:
Close Reason:


It would be cool to be able to attach eventhandlers just to players, as some systems only require operation on player.
Examples are here: http://browser.dev-heaven.net/cfg_vehicles/xeh/CAManBase
Or overview: http://browser.dev-heaven.net/configclasses/config/Extended_Fired_EventHandlers


Updated by Sickboy about 7 years ago

  • Category set to XEH
  • Status changed from New to In progress
  • Assignee set to Sickboy
  • Target version set to Future
  • % Done changed from 0 to 10

A simple prototype: http://www.pastie.org/996567

And some chat notes
19:30:20 but ehrm, I just got a different idea
19:30:37 what if we add onlyForPlayer=1; to XEH
19:30:46 if you specify it, the eventhandler will not be stored on the player
19:31:05 then in the eventhandlers that are actually attached to the unit
19:31:11 if player == _this ?
19:31:14 hm :D

Updated by Sickboy almost 7 years ago

  • Assignee changed from Sickboy to killswitch
  • Target version changed from Future to v0.5.0 - OA
  • % Done changed from 10 to 80
  • Component set to extended_eventhandlers

XEH capability for Player-Only eventhandlers, only attaching the events to players, cutting out the many "if (player == _this select 0)" etc.
Ongoing discussion at;

code available as always in CBA repo; http://dev-heaven.net/projects/cca/repository

Updated by Sickboy almost 7 years ago

  • Status changed from In progress to Closed
  • % Done changed from 80 to 100

Also available in: Atom PDF