OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: Binary on 26 Dec 2009, 04:19:03

Title: Warning if player kills civilian
Post by: Binary on 26 Dec 2009, 04:19:03
Hey folks ! :)

I'm wondering what would be the best way to go about this..
I have a mission with a bunch of civilians placed around the map - and I'd like to display a sidechat message if one these are killed..
Just a simple:
"A CIVILIAN HAS BEEN KILLED ! CHECK YOUR FIRE!" or something.

Is there some way to associate this with every civilian ?

Edit: Anyone ??  :confused:
Sorry to bump - I'm just really unsure how to achieve this
Title: Re: Warning if player kills civilian
Post by: Zonekiller on 07 Jan 2010, 14:03:31
add an eh to every civilian


ie   this addEventHandler["killed",{_this execVM "warning.sqf";}];

warning.sqf
Code: [Select]
_killer = _this select 1;

_killer sideChat "STOP KILLING THE CIVILIANS";
Title: Re: Warning if player kills civilian
Post by: Binary on 10 Jan 2010, 06:05:24
Sounds like a sensible option :)

What about performance impact, if using it on a lot of units?
It would only really take up resources, once the unit is killed, right ??