Feature #11092

local Player-Only eventhandlers

Added by Sickboy over 4 years ago. Updated over 4 years ago.

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

100%

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

Description

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
etc.

History

Updated by Sickboy over 4 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 over 4 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;
https://wave.google.com/wave/waveref/googlewave.com/w+yst6bKikX/~/conv+root/b+-vs2awYfp

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

Updated by Sickboy over 4 years ago

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

Also available in: Atom PDF