Alle guten Dinge sind 3...
In Ace werden im basic medical system die verwundeten Körperteile nicht mehr weiß, sondern gelb oder rot dargestellt QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))
Dazu wird in ACE wohl eine Modifierfunktion benutzt: fnc_modifyMedicalAction
Diese wird in der Config hinterlegt:
Code: https://github.com/acemod/ACE3/blob/master/addons/medical/ACE_Medical_SelfActions.hpp
- class ACE_Head {
- displayName = CSTRING(Head);
- icon = PATHTOF(UI\icons\medical_cross.paa);
- exceptions[] = {"isNotInside", "isNotSitting"};
- statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
- modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction));
- condition = "true";
- runOnHover = 1;
So mache ich es eigentlich auch, dennoch funktioniert es nicht. Hab ich irgendetwas übersehen?
Code
- CODI_MS_fnc_modifyAction = {
- params ["_caller", "_target", "_selection", "_actionData"];
- private _wound = _unit getVariable[format["CODI_MS_wound%1", _selection], 0];
- private _bandage = _unit getVariable[format["CODI_MS_bandage%1", _selection], 0];
- private _tourniquet = _unit getVariable[format["CODI_MS_tourniquet%1", _selection], 0];
- if (_wound > 0) then
- {
- if (_wound > _bandage && _tourniquet == 0) then
- {
- _actionData set [2, "\CODI_MS\pictures\medical_crossRed.paa"];
- }
- else
- {
- _actionData set [2, "\CODI_MS\pictures\medical_crossYellow.paa"];
- };
- };
- };
Code: config.cpp
Danke nochmal für die bisherige Hilfe.
Ich könnte wetten ich habe irgendwo einen ganz behin... Fehler drinnen.