Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: The KILLED eventhandler  (Read 2189 times)

0 Members and 1 Guest are viewing this topic.

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
The KILLED eventhandler
« on: 17 Aug 2009, 15:55:00 »
Init line of an enemy unit:
Code: [Select]
this addeventhandler ["killed", { [this,player] exec "enemygotkilled.sqs"}]
enemygotkilled.sqs
Code: [Select]
_guy=_this select 0;
_killer=_this select 1;
;----------------------
?_killer!= player : exit
_kills=0
;---------------------
#start
_kills=_kills+1
hint format ["Rating : %1\n Health Status : %2\n\n Number of enemies killed : %3/n",rating player,getdammage player,_kills]
exit
;---------------------------------
Everything went fine, except that i don't know how to make them with titletext ???

Also i wanted to add >>>>number of enemies left in a trigger area (trigger name is area1), but i  :dunno: how to do that...... ???

Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(