Jump to content
eazye

Is the ace 3 medical system useful in single player?

Recommended Posts

Im just starting to get familiar with ace3. I mainly play single player and enjiy the medical system and interacting with AI teammates with the ability to drag, carry heal etc. But as far as I know the AI does not heal you and you are just left to bleed out if badly injured. Is there an option to remove this without completely deleting the medical pbo so at least I can treat myself through the vanilla version while still being able to interact with the AI through ace?

Share this post


Link to post
Share on other sites

So are you not able to use SELF INTERACTIONS [Default Windows + CTRL] to heal yourself?

Share this post


Link to post
Share on other sites

So are you not able to use SELF INTERACTIONS [Default Windows + CTRL] to heal yourself?

Yea I can, im referring to when you go unconscious. With noone to heal you you're just left there to bleed out and die. Unless im missing it there is nothing in the options to remove this.

Also the only revive system I knew of where the AI healed you was A3 woumding system but I cant get it to work like it used to a few years ago.

Share this post


Link to post
Share on other sites

Oh I see, sorry did not understand that part.
You could bind a key to toggle unconscious on yourself?

waituntil {!isnull (finddisplay 46)};
(findDisplay 46) displayAddEventHandler ["KeyDown","_this select 1 call WH_KEYDOWN_FNC;false;"];

WH_KEYDOWN_FNC = {
    switch (_this) do {
        
//When Y is pressed, wake up from being knocked out
        case 44: {
            player setVariable ["ACE_isUnconscious", false];
        };
    };
};

Untested but should do the trick for you.

Share this post


Link to post
Share on other sites

Oh I see, sorry did not understand that part.

You could bind a key to toggle unconscious on yourself?

waituntil {!isnull (finddisplay 46)};
(findDisplay 46) displayAddEventHandler ["KeyDown","_this select 1 call WH_KEYDOWN_FNC;false;"];

WH_KEYDOWN_FNC = {
    switch (_this) do {
        
//When Y is pressed, wake up from being knocked out
        case 44: {
            player setVariable ["ACE_isUnconscious", false];
        };
    };
};

Untested but should do the trick for you.

Thanks for the response but it will be awhile before I get to my pc to test it but until then where do I exactly put that? Is all that for my units init or a script?

Share this post


Link to post
Share on other sites

You can also setup a script to run in a loop, that checks every x minutes for your consciousness, then sets the ACE variable above to wake you back up. Then it won't seem like you're such a super-soldier by a keypress.

You can also set the keypress to call the nearest friendly AI (call for help/medic) over to you, and then and only then, wake you backup by setting the variable after he arrives to simulate help.

(On phone right now, so can't post example code)

Share this post


Link to post
Share on other sites

This is awesome. Lol.
 
Advanced Combat Environment 3 (ACE3)
The realism mod for Arma 3

 
And you guys are propose to set something like "When Y is pressed, wake up from being knocked out",
"setup a script to run in a loop, that checks every x minutes for your consciousness, then sets the ACE variable above to wake you back up"
 
Shame on you!!
 
ACE 3 is not friendly with SP , but there are already a script that allow your AI team member medic to heal player and others ai team members using ace3

Works in MP too.

 

medic unit init field:

dummy = [this, units (group this)] execVM "automedic.sqf";

Bardosy automedic.sqf script -edited:

// ai medic using ACE3
#include "\z\ace\addons\medical\script_component.hpp"
private ["_needradio", "_medic", "_injured", "_deads"];
_medic = _this select 0;
_units = _this select 1;
_injured = objNull;
_needradio = true;

//main loop
while {alive _medic} do {

	sleep 2;
	//waiting for a wounded
	while {(isNull _injured) and (alive _medic)} do {
		//if the medic is injured
		if (_medic getvariable [QGVAR(isBleeding), false]) then {
			//if medic is already dead, then exit
			if (!alive _medic) exitWith{};
			//else he is the injured and he is a priority to heal himself
			_injured = _medic;
		} else {
			_deads = [];
			{
				if (!alive _x or isNull _x) then {
					_deads = _deads + [_x];
				};
				if ((isNull _injured) and (_x getvariable [QGVAR(isBleeding), false]) and (alive _x) and (!isNull _x)) then {			
					_injured = _x;
					if (_needradio) then {_medic groupChat format["Keep calm %1, I will heal you.", (name _injured)];};
				};
			} foreach _units;
			_units = _units - _deads;
		};
		sleep 5;
	};

	if(!alive _medic) exitWith{};
	
	//we have an injured, stop him
	if ((!isPlayer _injured) and (_medic!=_injured)) then {
		_injured disableAI "MOVE";
		_injured setUnitPos "down";
	};
	if (_medic != _injured) then {
		//medic go for him
		_medic doMove (position _injured);
		while {(_medic distance _injured > 10) and (alive _injured) and (!isNull _injured)} do {		
			sleep 1;
			_medic doMove (position _injured);
			if(!alive _medic) exitWith{_injured enableAI "MOVE"; _injured setUnitPos "auto";};
		};
	};
	
	if(!alive _medic) exitWith{_injured enableAI "MOVE"; _injured setUnitPos "auto";};
	
	//when medic is close enough to the injured...
	//...and injured is still alive
	if ((alive _injured) and (!isNull _injured) and (alive _medic)) then {	
		//stop the medic
//		_medic disableAI "MOVE";
//		_medic setUnitPos "middle";
//		sleep 1;
		//HEAL the injured
		// ******************************
		_medic allowDamage false;
		_medic action ["HealSoldier", _injured];
		_medic playMove "AinvPknlMstpSnonWnonDnon_medic_1";
		sleep 9;
		_injured setVariable [QGVAR(pain), 0, true];
		_injured setVariable [QGVAR(morphine), 0, true];
		_injured setVariable [QGVAR(bloodVolume), 100, true];
		_injured setVariable ["ACE_isUnconscious", false, true];
		_injured setvariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
		_injured setvariable [QGVAR(openWounds), [], true];
		_injured setvariable [QGVAR(bandagedWounds), [], true];
		_injured setVariable [QGVAR(internalWounds), [], true];
		_injured setvariable [QGVAR(lastUniqueWoundID), 1, true];
		_injured setVariable [QGVAR(heartRate), 80];
		_injured setvariable [QGVAR(heartRateAdjustments), []];
		_injured setvariable [QGVAR(bloodPressure), [80, 120]];
		_injured setVariable [QGVAR(peripheralResistance), 100];
		_injured setVariable [QGVAR(fractures), [], true];
		_injured setvariable [QGVAR(triageLevel), 0, true];
		_injured setvariable [QGVAR(triageCard), [], true];
		_injured setVariable [QGVAR(salineIVVolume), 0, true];
		_injured setVariable [QGVAR(plasmaIVVolume), 0, true];
		_injured setVariable [QGVAR(bloodIVVolume), 0, true];
		_injured setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
		_injured setvariable [QGVAR(airwayStatus), 100];
		_injured setVariable [QGVAR(airwayOccluded), false];
		_injured setvariable [QGVAR(airwayCollapsed), false];
		_injured setvariable [QGVAR(addedToUnitLoop), false, true];
		_injured setvariable [QGVAR(inCardiacArrest), false, true];
		_injured setvariable [QGVAR(hasLostBlood), 0, true];
		_injured setvariable [QGVAR(isBleeding), false, true];
		_injured setvariable [QGVAR(hasPain), false, true];
		_injured setvariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives), true];
		_injured setvariable [QGVAR(painSuppress), 0, true];
		_injured setDamage 0;
		// ******************************
		//wait until injured is healed or dead
		waitUntil { !(_injured getvariable [QGVAR(isBleeding), false]) or (!alive _injured) };
		sleep 3;
		if (_medic != _injured) then {
			if (_needradio) then {_medic groupChat format["OK %1, you are ready to fight.", (name _injured)];};
		};
		_medic allowDamage true;
		//healed soldier is ready to fight
		_injured enableAI "MOVE";
		_injured setUnitPos "auto";
	};
	//we are ready for looking a new injured
	_injured = objNull;
	//set the medic to ready to looking for a new injured
//	_medic enableAI "MOVE";
//	_medic setUnitPos "auto";
	//doMove stops the medic, so we have to command him to follow his leader
	_medic doFollow (leader group _medic);
	if(!alive _medic) exitWith{_injured enableAI "MOVE"; _injured setUnitPos "auto";};
};
  • Like 2

Share this post


Link to post
Share on other sites

I would generally recommend against using ACE in SP missions unless the author specifically made the mission ACE-compatible.

 

Some of the scripts in ACE can be mission-breaking since ACE medical changes since ACE medical changes the damage model (which can lead to essential units dying when they're not supposed to), and ACE explosive can mess with missions that require you to use explosives. Also, ACE eats up quite a bit of your CPU which can be troublesome for some missions.

  • Like 1

Share this post


Link to post
Share on other sites

This is awesome. Lol.

 Advanced Combat Environment 3 (ACE3)

The realism mod for Arma 3

 

And you guys are propose to set something like "When Y is pressed, wake up from being knocked out",

"setup a script to run in a loop, that checks every x minutes for your consciousness, then sets the ACE variable above to wake you back up"

 

Shame on you!!

 

ACE 3 is not friendly with SP , but there are already a script that allow your AI team member medic to heal players and others ai team members using ace3

Works in MP too.

 

medic unit init field:

dummy = [this, units (group this)] execVM "automedic.sqf";
Bardosy automedic.sqf script -edited:

// ai medic using ACE3
#include "\z\ace\addons\medical\script_component.hpp"
private ["_needradio", "_medic", "_injured", "_deads"];
_medic = _this select 0;
_units = _this select 1;
_injured = objNull;
_needradio = true;

//main loop
while {alive _medic} do {

	sleep 2;
	//waiting for a wounded
	while {(isNull _injured) and (alive _medic)} do {
		//if the medic is injured
		if (_medic getvariable [QGVAR(isBleeding), false]) then {
			//if medic is already dead, then exit
			if (!alive _medic) exitWith{};
			//else he is the injured and he is a priority to heal himself
			_injured = _medic;
		} else {
			_deads = [];
			{
				if (!alive _x or isNull _x) then {
					_deads = _deads + [_x];
				};
				if ((isNull _injured) and (_x getvariable [QGVAR(isBleeding), false]) and (alive _x) and (!isNull _x)) then {			
					_injured = _x;
					if (_needradio) then {_medic groupChat format["Keep calm %1, I will heal you.", (name _injured)];};
				};
			} foreach _units;
			_units = _units - _deads;
		};
		sleep 5;
	};

	if(!alive _medic) exitWith{};
	
	//we have an injured, stop him
	if ((!isPlayer _injured) and (_medic!=_injured)) then {
		_injured disableAI "MOVE";
		_injured setUnitPos "down";
	};
	if (_medic != _injured) then {
		//medic go for him
		_medic doMove (position _injured);
		while {(_medic distance _injured > 10) and (alive _injured) and (!isNull _injured)} do {		
			sleep 1;
			_medic doMove (position _injured);
			if(!alive _medic) exitWith{_injured enableAI "MOVE"; _injured setUnitPos "auto";};
		};
	};
	
	if(!alive _medic) exitWith{_injured enableAI "MOVE"; _injured setUnitPos "auto";};
	
	//when medic is close enough to the injured...
	//...and injured is still alive
	if ((alive _injured) and (!isNull _injured) and (alive _medic)) then {	
		//stop the medic
//		_medic disableAI "MOVE";
//		_medic setUnitPos "middle";
//		sleep 1;
		//HEAL the injured
		// ******************************
		_medic allowDamage false;
		_medic action ["HealSoldier", _injured];
		_medic playMove "AinvPknlMstpSnonWnonDnon_medic_1";
		sleep 9;
		_injured setVariable [QGVAR(pain), 0, true];
		_injured setVariable [QGVAR(morphine), 0, true];
		_injured setVariable [QGVAR(bloodVolume), 100, true];
		_injured setVariable ["ACE_isUnconscious", false, true];
		_injured setvariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
		_injured setvariable [QGVAR(openWounds), [], true];
		_injured setvariable [QGVAR(bandagedWounds), [], true];
		_injured setVariable [QGVAR(internalWounds), [], true];
		_injured setvariable [QGVAR(lastUniqueWoundID), 1, true];
		_injured setVariable [QGVAR(heartRate), 80];
		_injured setvariable [QGVAR(heartRateAdjustments), []];
		_injured setvariable [QGVAR(bloodPressure), [80, 120]];
		_injured setVariable [QGVAR(peripheralResistance), 100];
		_injured setVariable [QGVAR(fractures), [], true];
		_injured setvariable [QGVAR(triageLevel), 0, true];
		_injured setvariable [QGVAR(triageCard), [], true];
		_injured setVariable [QGVAR(salineIVVolume), 0, true];
		_injured setVariable [QGVAR(plasmaIVVolume), 0, true];
		_injured setVariable [QGVAR(bloodIVVolume), 0, true];
		_injured setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
		_injured setvariable [QGVAR(airwayStatus), 100];
		_injured setVariable [QGVAR(airwayOccluded), false];
		_injured setvariable [QGVAR(airwayCollapsed), false];
		_injured setvariable [QGVAR(addedToUnitLoop), false, true];
		_injured setvariable [QGVAR(inCardiacArrest), false, true];
		_injured setvariable [QGVAR(hasLostBlood), 0, true];
		_injured setvariable [QGVAR(isBleeding), false, true];
		_injured setvariable [QGVAR(hasPain), false, true];
		_injured setvariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives), true];
		_injured setvariable [QGVAR(painSuppress), 0, true];
		_injured setDamage 0;
		// ******************************
		//wait until injured is healed or dead
		waitUntil { !(_injured getvariable [QGVAR(isBleeding), false]) or (!alive _injured) };
		sleep 3;
		if (_medic != _injured) then {
			if (_needradio) then {_medic groupChat format["OK %1, you are ready to fight.", (name _injured)];};
		};
		_medic allowDamage true;
		//healed soldier is ready to fight
		_injured enableAI "MOVE";
		_injured setUnitPos "auto";
	};
	//we are ready for looking a new injured
	_injured = objNull;
	//set the medic to ready to looking for a new injured
//	_medic enableAI "MOVE";
//	_medic setUnitPos "auto";
	//doMove stops the medic, so we have to command him to follow his leader
	_medic doFollow (leader group _medic);
	if(!alive _medic) exitWith{_injured enableAI "MOVE"; _injured setUnitPos "auto";};
};

Come on man! And patching yourself up when getting shot in the head and then going back off to kill some dudes is a more realistic alternative?

Share this post


Link to post
Share on other sites

This is awesome. Lol.

 

Advanced Combat Environment 3 (ACE3)

The realism mod for Arma 3

 

And you guys are propose to set something like "When Y is pressed, wake up from being knocked out",

"setup a script to run in a loop, that checks every x minutes for your consciousness, then sets the ACE variable above to wake you back up"

 

Shame on you!!

 

ACE 3 is not friendly with SP , but there are already a script that allow your AI team member medic to heal players and others ai team members using ace3

Works in MP too.

 

medic unit init field:

dummy = [this, units (group this)] execVM "automedic.sqf";

Bardosy automedic.sqf script -edited:

// ai medic using ACE3
#include "\z\ace\addons\medical\script_component.hpp"
private ["_needradio", "_medic", "_injured", "_deads"];
_medic = _this select 0;
_units = _this select 1;
_injured = objNull;
_needradio = true;

//main loop
while {alive _medic} do {

	sleep 2;
	//waiting for a wounded
	while {(isNull _injured) and (alive _medic)} do {
		//if the medic is injured
		if (_medic getvariable [QGVAR(isBleeding), false]) then {
			//if medic is already dead, then exit
			if (!alive _medic) exitWith{};
			//else he is the injured and he is a priority to heal himself
			_injured = _medic;
		} else {
			_deads = [];
			{
				if (!alive _x or isNull _x) then {
					_deads = _deads + [_x];
				};
				if ((isNull _injured) and (_x getvariable [QGVAR(isBleeding), false]) and (alive _x) and (!isNull _x)) then {			
					_injured = _x;
					if (_needradio) then {_medic groupChat format["Keep calm %1, I will heal you.", (name _injured)];};
				};
			} foreach _units;
			_units = _units - _deads;
		};
		sleep 5;
	};

	if(!alive _medic) exitWith{};
	
	//we have an injured, stop him
	if ((!isPlayer _injured) and (_medic!=_injured)) then {
		_injured disableAI "MOVE";
		_injured setUnitPos "down";
	};
	if (_medic != _injured) then {
		//medic go for him
		_medic doMove (position _injured);
		while {(_medic distance _injured > 10) and (alive _injured) and (!isNull _injured)} do {		
			sleep 1;
			_medic doMove (position _injured);
			if(!alive _medic) exitWith{_injured enableAI "MOVE"; _injured setUnitPos "auto";};
		};
	};
	
	if(!alive _medic) exitWith{_injured enableAI "MOVE"; _injured setUnitPos "auto";};
	
	//when medic is close enough to the injured...
	//...and injured is still alive
	if ((alive _injured) and (!isNull _injured) and (alive _medic)) then {	
		//stop the medic
//		_medic disableAI "MOVE";
//		_medic setUnitPos "middle";
//		sleep 1;
		//HEAL the injured
		// ******************************
		_medic allowDamage false;
		_medic action ["HealSoldier", _injured];
		_medic playMove "AinvPknlMstpSnonWnonDnon_medic_1";
		sleep 9;
		_injured setVariable [QGVAR(pain), 0, true];
		_injured setVariable [QGVAR(morphine), 0, true];
		_injured setVariable [QGVAR(bloodVolume), 100, true];
		_injured setVariable ["ACE_isUnconscious", false, true];
		_injured setvariable [QGVAR(tourniquets), [0,0,0,0,0,0], true];
		_injured setvariable [QGVAR(openWounds), [], true];
		_injured setvariable [QGVAR(bandagedWounds), [], true];
		_injured setVariable [QGVAR(internalWounds), [], true];
		_injured setvariable [QGVAR(lastUniqueWoundID), 1, true];
		_injured setVariable [QGVAR(heartRate), 80];
		_injured setvariable [QGVAR(heartRateAdjustments), []];
		_injured setvariable [QGVAR(bloodPressure), [80, 120]];
		_injured setVariable [QGVAR(peripheralResistance), 100];
		_injured setVariable [QGVAR(fractures), [], true];
		_injured setvariable [QGVAR(triageLevel), 0, true];
		_injured setvariable [QGVAR(triageCard), [], true];
		_injured setVariable [QGVAR(salineIVVolume), 0, true];
		_injured setVariable [QGVAR(plasmaIVVolume), 0, true];
		_injured setVariable [QGVAR(bloodIVVolume), 0, true];
		_injured setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
		_injured setvariable [QGVAR(airwayStatus), 100];
		_injured setVariable [QGVAR(airwayOccluded), false];
		_injured setvariable [QGVAR(airwayCollapsed), false];
		_injured setvariable [QGVAR(addedToUnitLoop), false, true];
		_injured setvariable [QGVAR(inCardiacArrest), false, true];
		_injured setvariable [QGVAR(hasLostBlood), 0, true];
		_injured setvariable [QGVAR(isBleeding), false, true];
		_injured setvariable [QGVAR(hasPain), false, true];
		_injured setvariable [QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives), true];
		_injured setvariable [QGVAR(painSuppress), 0, true];
		_injured setDamage 0;
		// ******************************
		//wait until injured is healed or dead
		waitUntil { !(_injured getvariable [QGVAR(isBleeding), false]) or (!alive _injured) };
		sleep 3;
		if (_medic != _injured) then {
			if (_needradio) then {_medic groupChat format["OK %1, you are ready to fight.", (name _injured)];};
		};
		_medic allowDamage true;
		//healed soldier is ready to fight
		_injured enableAI "MOVE";
		_injured setUnitPos "auto";
	};
	//we are ready for looking a new injured
	_injured = objNull;
	//set the medic to ready to looking for a new injured
//	_medic enableAI "MOVE";
//	_medic setUnitPos "auto";
	//doMove stops the medic, so we have to command him to follow his leader
	_medic doFollow (leader group _medic);
	if(!alive _medic) exitWith{_injured enableAI "MOVE"; _injured setUnitPos "auto";};
};

 

Sorry to bump this, but I'm currently replaying The East Wind in preparation for Apex, and I was curious about something regarding this post.

 

Is there a way to alter that script to allow the AI to self-heal? Because what I gather from the post, only humans and AI medics can heal, and that kinda leaves out the regular dudes. :P

Share this post


Link to post
Share on other sites

Sorry to bump this, but I'm currently replaying The East Wind in preparation for Apex, and I was curious about something regarding this post.

 

Is there a way to alter that script to allow the AI to self-heal? Because what I gather from the post, only humans and AI medics can heal, and that kinda leaves out the regular dudes. :P

 

That script quoted doesn't seem to make any distinction between unit types.  Run that script on a unit and it'll become a "medic" trying to heal anyone hurt, especially themselves.  Now, ACE itself might impose limits based on the Medic flag, but the script isn't limiting normal grunts from patching themselves up.

Share this post


Link to post
Share on other sites

That script quoted doesn't seem to make any distinction between unit types.  Run that script on a unit and it'll become a "medic" trying to heal anyone hurt, especially themselves.  Now, ACE itself might impose limits based on the Medic flag, but the script isn't limiting normal grunts from patching themselves up.

I see. Interestin'.

 

What would need to be changed with that script to make it apply to all units if one starts pre-made content, like as alluded to, the campaign? I'm not an decent coder in the slightest, but from what I can grasp at that script, it seems to be designed to be used as an init to a specific unit. How can one make it general to all active elements in a mission?

 

I'm quite sure the above is a pretty dumb question. :P

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

×