Home   Help Search Login Register  

Author Topic: respawn and eventhandlers  (Read 1720 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
respawn and eventhandlers
« 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?
urp!

Offline i0n0s

  • Former Staff
  • ****
Re: respawn and eventhandlers
« Reply #1 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

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: respawn and eventhandlers
« Reply #2 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.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: respawn and eventhandlers
« Reply #3 on: 11 Sep 2008, 18:49:51 »
ionos,
Please supply the link to that quote.  :yes:
urp!

Offline i0n0s

  • Former Staff
  • ****

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: respawn and eventhandlers
« Reply #5 on: 11 Sep 2008, 21:01:07 »
Thanks. Kept looking at that page and missing that one line of text. Old age you know...
urp!