Jump to content
Sign in to follow this  
fabrizio_t

EVENT HANDLERS: problem with "killed "event handler

Recommended Posts

After some headache i finally found a event handlers problem:

if i put in editor a unit with the following code into its INIT field:

this addEventHandler ["killed", "player sidechat 'unit was killed';"];

then if i kill him with a SINGLE shot the 'unit was killed' sentence is triggered TWICE.

What's the problem ? Latest beta here. No mods loaded.

EDIT: Checked also version 1.03. Same problem.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

Yeah trying to figure it out too...

I use this code to track the "score". Let say I have 16 US soldiers, I often end up with scores around 30.

In the init.sqf:

rucpt = 0;
uscpt = 0;

On every US troop:

this addEventHandler ["killed", "uscpt=uscpt+1;hint format['Killed RU: %1 US: %2', rucpt, uscpt]"]

On every RU troop:

this addEventHandler ["killed", "rucpt=rucpt+1;hint format['Killed RU: %1 US: %2', rucpt, uscpt]"]

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×