Jump to content
Sign in to follow this  
nomisum

Eventhandler killed gives back killer self

Recommended Posts

Did anybody experience this before? I have an killed EH and "this select 0" as well as "this select 1" (should be unit / killer) both give back unit aka victim.

Thoughts?

Im helpless, having spent hours on this issue.

Share this post


Link to post
Share on other sites

Can you supply the entirety of your EH, so we can see it, cause most of the time the issues pop up from other errors in the code, not just what seems to be the problem.

Share this post


Link to post
Share on other sites

Do you use any addons? I have seen plenty of threads where commands are working fine on everybody else's machines (including my own) but a script/addon has broken it. This is one of the reason's why I'm weary to write any scripts that are meant to initialize with the mission, then run until restart/mission end

If not, then you'll just have to post the script

Share this post


Link to post
Share on other sites

Works okay for me in the editor. I do think I've heard something about killed EH acting wonky with the latest patch though.

.

civ1 addEventhandler ["killed", {
player sideChat format ["%1 >> %2", (_this select 1), (_this select 0)]; // B Alpha 1-1:1 (Iceman77) >> civ1
}];

Share this post


Link to post
Share on other sites

thanks guys, I'll post the code in the morning. Quite sure it was working once though.

Share this post


Link to post
Share on other sites

Ok, I know I should have tried this earlier ;)

It HAS to be some mod conflict. Tried a sample mission without all the ton of other scripts I am running, stripped down to the following (I left all the other stuff in, just to be sure)

fnc_hostage_killed = {

private ["_unit","_killer"];

_unit = _this select 0;

_killer = _this select 1;

_vicFac = side (group _victim);

_killerFac = side (group _killer);

if (side _killer == east && !(RESCUE_TIME_ELAPSED)) then {

HOSTAGE_MURDERED = true;

publicVariable "HOSTAGE_MURDERED";

if (DEBUG) then {

["DEBUG: Hostage murdered by Taliban"] call AGM_Core_fnc_displayTextStructured;

};

};

if (side _killer == east && (RESCUE_TIME_ELAPSED)) then {

HOSTAGE_EXECUTED = true;

publicVariable"HOSTAGE_EXECUTED";

if (DEBUG) then {

["DEBUG: Hostage executed by Taliban"] call AGM_Core_fnc_displayTextStructured;

};

};

if (side _killer == independent) then {

HOSTAGE_FRIENDLYFIRE = true;

publicVariable "HOSTAGE_FRIENDLYFIRE";

if (DEBUG) then {

["DEBUG: Hostage killed by NATO"] call AGM_Core_fnc_displayTextStructured;

};

};

if (DEBUG) then {hintsilent format ["DEBUG: %1 got killed by person %2 and side %3", _unit, _killer,_killerFac];};

if isServer then {

HOSTAGE_DEAD = true;

publicVariable "HOSTAGE_DEAD";

};

};

if (isServer) then {

hostage addEventHandler ["killed", {[_this select 0, _this select 1] call fnc_hostage_killed;}];

if (DEBUG) then {

hint "DEBUG: eventhandler hostage added";

};

} else {

// Function to display the death count.

fnc_showDeathMessage = {

if (DEBUG) then {

hintSilent format ["DEBUG: Death count hostage", _this];

};

};

// PublicVariable eventhandler to catch the update sent by the server.

"HOSTAGE_DEAD" addPublicVariableEventHandler {call fnc_showDeathMessage};

};

What should I say, in vanilla without mods it works. Activating my modset again it doesnt (giving back the victim as the killer, like suicide). Now I have to find the culprit going through them one by one. I'll report later, here is the list of candidates :yay::

@task_force_radio

@A3MP

@AGM

@ARC_GERUP

@CAF_AG

@CBA_A3

@CLAfghan

@dac_a3

@gnt_c185_a3

@hlc_ar15

@hlcmods_core

@hlcmods_fal

@hlcmods_g3

@hlcmods_m14

@hlcmods_M60E4

@JSRS2

@outlw_magrepack

@rds

@rds_civpack

@rds_tank

@rds_tank_aggressors

@sthud_a3

@tao_foldmap_a3

@unlocked_uniforms

---------- Post added at 10:15 ---------- Previous post was at 10:02 ----------

[sorry for triplepost]

I found it out. Its my beloved @AGM (v. 0.9.3) I'll file a bug ticket, sample mission attached here:

http://www.gruppe-adler.de/wp-content/uploads/test_killed_eh.Stratis.zip

Edit: Apparently duplicate and fixed in next AGM version (0.9.4.) https://github.com/KoffeinFlummi/AGM/issues/1155

Edited by nomisum
added info bug ticket

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  

×