OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Mr.Peanut on 11 Sep 2008, 17:36:24

Title: respawn and eventhandlers
Post by: Mr.Peanut on 11 Sep 2008, 17:36:24
I could have sworn I read somwhere on the Biki that when players respawn you do not need to re-add any eventhandlers to them. I think it must only be a unit's init eventhandler. Does anyone know from experience?
Title: Re: respawn and eventhandlers
Post by: i0n0s on 11 Sep 2008, 17:43:32
Quote
Event handlers are persistent (i.e. they stay attached to a unit, even after it dies and respawns).
under multiplayer
Title: Re: respawn and eventhandlers
Post by: Spooner on 11 Sep 2008, 17:46:20
@i0n0s: You can't respawn in SP, so it isn't an issue.

When a player respawns, he definitely keeps all event handlers applied to a previous incarnation via addEventHandler (he obviously still has any hard-coded event handlers applied in config too). The init isn't run again though, but XEH 1.8 intruduced a "run init again on respawn" flag. Not sure about respawning vehicles, but only because I've never tried it.
Title: Re: respawn and eventhandlers
Post by: Mr.Peanut on 11 Sep 2008, 18:49:51
ionos,
Please supply the link to that quote.  :yes:
Title: Re: respawn and eventhandlers
Post by: i0n0s on 11 Sep 2008, 19:05:59
http://community.bistudio.com/wiki/addEventHandler (http://community.bistudio.com/wiki/addEventHandler)
Title: Re: respawn and eventhandlers
Post by: Mr.Peanut on 11 Sep 2008, 21:01:07
Thanks. Kept looking at that page and missing that one line of text. Old age you know...