Home   Help Search Login Register  

Author Topic: "killed" Eventhandler  (Read 1303 times)

0 Members and 1 Guest are viewing this topic.

StonedSoldier

  • Guest
"killed" Eventhandler
« on: 12 Jan 2005, 16:08:47 »
how do i make a "killed" EH run on all local machines and not just exec on server??

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:"killed" Eventhandler
« Reply #1 on: 12 Jan 2005, 18:57:06 »
I think you need too be a little more specific.
I dont really understand what your asking, you want a killed eventhandler on all units however I do not know what you wish too happen.
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:"killed" Eventhandler
« Reply #2 on: 16 Jan 2005, 05:24:38 »
Some confusion of usage of "local" and locality here...the killed event suffers from not being broadcast to all nodes in a MP session . What does that mean? It means:

The "killed" event handler will only run on the machine where the killed unit is local

Read through that at least three times so you understand what it means and also what it doesn't. It is not a server-client thing, rather a local vs not local and there's a difference.

Examples:
-------------
  • If you get killed, the killed EH will run on your machine only, since you are local to your machine
  • AI:s under your command are also local to your machine, so their killed EH:s run on your machine too.
  • Units under no player's command are local to the server machine. This could be a dedicated server or the MP hoster guy (who also plays on that machine)
Now, let's get back to the question at hand:
Quote
how do i make a "killed" EH run on all local machines and not just exec on server??
You have to figure out a way to signal all other machines that a certain unit is dead. Two basic systems come to mind:
    [1] Have a
publicVariable system handle the signalling of deaths.
[2] Run a script on all machines that check a list of units and see if one or more is dead.[/list]
Both are kludgy, but that's what we have. Exactly what do do depends on what you need to have done when a unit buys the farm. Perhaps if you can be more specific with that we can find a solution?

To this day I have never understood why the killed event isn't broadcast. I cannot come up with a good reason for it. It is easily one of the biggest remaining flaws in OFP, IMHO. Ok, rant over.  :-X
« Last Edit: 16 Jan 2005, 05:34:21 by Killswitch »