OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: fragger on 08 Feb 2004, 20:13:11
-
Im making a multiplayer mission, and I want a script to check if the player on the side of the civilians kills another civilian (friendly fire). If so then I want the game to end. I also dont want the game to end if the opposing player kills a civilian. How do I do this? ???
-
You need to fiddle with EHs. Launch a script like this in the EH:
_killer = _this select 0
? _killer side == civilian : forceend true
Or something like that, but you get the picture?
:beat: *Gets Shot* :beat:
-
Kind of, i've never used event handlers before but i'll give it a try
i'll look in the editors depot
-
There's a very good thing on EH ... can't remember if its a tute or in the FAQ. There's something in the comref too. They are not hard to use and as Armsty says will solve your problem perfectly.
The point is that that you attach the EH "killed" to the loon you don't want to die. If he does die, the EH detects who killed him: the script (written by you) called by the EH then checks to see who killed him and what the consequences should be.