OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Unnamed on 09 Sep 2004, 07:06:25

Title: Killed Event Handler
Post by: Unnamed on 09 Sep 2004, 07:06:25
I've read a couple of posts about the killed event handler, but I dont know enough about MP to know if it answers the question I had.

If I create an empty vehicle, on a dedicated server, and add a killed event. Using the following code:

Code: [Select]
? !(Local Server):Exit

_Tank="M1A1" CreateVehicle _TankPos

_Tank AddEventHandler ["killed",{_this exec "killed.sqs"}]

Will killed.sqs be activated only by the server, even if the tank is being driven by a player, when it's destoyed?

Cheers
Title: Re:Killed Event Handler
Post by: olseric on 09 Sep 2004, 08:36:18
Someone correct me if I'm wrong, but yes, it will be server-side only because the event handler was added server-side only.
Title: Re:Killed Event Handler
Post by: Zombie on 09 Sep 2004, 13:27:18
that's the way I understand it.  The ?!(local server):exit command will exit the script from non server machines.    Make sure in the mission you put a game logic named server
Title: Re:Killed Event Handler
Post by: Unnamed on 09 Sep 2004, 22:48:44
Nice one.

Cheers