Home   Help Search Login Register  

Author Topic: Warning if player kills civilian  (Read 1572 times)

0 Members and 1 Guest are viewing this topic.

Offline Binary

  • Members
  • *
Warning if player kills civilian
« 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
« Last Edit: 31 Dec 2009, 17:27:41 by Binary »
"Ah.. Home sweet hell !" - Al Bundy

Offline Zonekiller

  • Members
  • *
    • Zonekiller Page
Re: Warning if player kills civilian
« Reply #1 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";

Offline Binary

  • Members
  • *
Re: Warning if player kills civilian
« Reply #2 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 ??
"Ah.. Home sweet hell !" - Al Bundy