Forum Jump :

Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 58
In-game name: Kobayashi Maru

 
#191963 Posted at 2016-10-03 05:31        
     
Perhaps the way the unit detonate the bomb. If there is no "killer", I mean no unit assumed to kill himself here, the condition _killer == _victim has no sense.
So, you have to identify what the code is returning as "killer". If any or null, as I guess, you must find another way.

Try this new code with 2 changes:
- note what is hint when kamikaze is killed;
- If kamikaze is an AI and if killed by a player is an acceptable alternative for success, this should work.

   if (isServer) then {
      kamikaze addEventHandler ["killed", {
        params ["_victim","_killer"];

        (format [" victim: %1 killer: %2", _victim,_killer]) remoteExec ["hint"];

        if (isPlayer _killer) then {
         "END1" call bis_fnc_EndMission
        } else {
         "LOSER" call bis_fnc_endMission
        }
      }]
    };

This post was edited by Pierre MGI (2016-10-05 09:08, 719 days ago)

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS