OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: StonedSoldier on 12 Jan 2005, 16:08:47

Title: "killed" Eventhandler
Post by: StonedSoldier 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??
Title: Re:"killed" Eventhandler
Post by: RujiK 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.
Title: Re:"killed" Eventhandler
Post by: Killswitch 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:
-------------
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:
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