KillahPotatoes / KP-Liberation

The work on GreuhZbugs Liberation Mission for Arma 3 continues...
MIT License
266 stars 302 forks source link

Capturing surrendered enemies not possible #815

Closed LunaticManiac closed 4 years ago

LunaticManiac commented 4 years ago

When liberation is not running on local machine, capturing surrendered enemies is not possible. The reason is you are uising a function instead of the correct way of calling an event

replace: [_unit, true] call ACE_captives_fnc_setSurrendered; and [_unit, false] call ACE_captives_fnc_setSurrendered; with ["ace_captives_setSurrendered",[_unit,true],_unit] call CBA_fnc_targetEvent; and ["ace_captives_setSurrendered",[_unit,false],_unit] call CBA_fnc_targetEvent; in prisonner_ai.sqf

LunaticManiac commented 4 years ago

same error in civinfo_loop.sqf

Wyqer commented 4 years ago

Sorry, that's wrong. Ref: https://github.com/acemod/ACE3/blob/master/addons/captives/functions/fnc_setSurrendered.sqf

POWs are capturable on non-local machines without issues. And there is no need to use a CBA event function. It's not the "correct way", as in ACE_captives_fnc_setSurrendered the set variables are public on every machine, setCaptive has global effect and ACE is firing a global CBA event in the end.

CivInfo is a different cause of not working and already fixed for the next update. Ref: a6fb990a9484e97147f6105bb7b31518748308f9 and ee0124decaf9fd39984af24fb093f3b396b1d23b

Also use the provided issue templates to report an issue or create a PR, if you want to contribute specific things, which can get reviewed. As this issue is a false positive on your end due to edits, other mods, usage of derivative, etc. it'll be closed as invalid. Please use the templates to provide all needed information for the next time.

LunaticManiac commented 4 years ago

I already merged these fixes in my liberation copy. It's still not working. It's only working if you are the host. You can retry with friends.