Jump to content

Recommended Posts

I have been using the standard revive system for most of my missions for Arma 3. The problem I am running into recently for a mission is that once revived you no longer can be picked up again if downed. I understand that for realism that is awesome but for a less realistic and more forgiving mission multiple pickups in one run would be nice. I searched for a function that can set this but no luck. Anyone have an answer, besides using a different revive system? Thanks in advance.

Share this post


Link to post
Share on other sites

What do you mean by "picked up"? Are you in Arma vanilla (no mods)?

Share this post


Link to post
Share on other sites

Yes, just using the vanilla Arma Apex. When I say pick up I mean when a player is switched to the incapacitated state and then another friendly player holds space to "pick them up" to set the incapacitated player to a healthy state. This is using the End Game Revive System.

Share this post


Link to post
Share on other sites

Check in the editor "Attributes >> Multiplayer >> Revive >> Incapitation Mode". It should say "Basic" which means the players will always enter incapitation mode. Or at least it should...

Share this post


Link to post
Share on other sites

That is the case. Players will enter incapitation mode once after receiving max damage. After the one time they will force respawn. I am looking to have it unlimited times. 

Share this post


Link to post
Share on other sites

You can make choice also to "pay" with a first aid kit. So, in this case, you can't do that if you don't have anymore FAK.

Share this post


Link to post
Share on other sites

Okay found the following in BIS_fnc_reviveOnPlayerHandleDamageBasic:

//check if unit is not in vehicle and there is at least one other friendly player with revive enabled; otherwise kill the unit

and

//kill unit if there are no friendlies with enabled revive

 

Complete script:

Spoiler

// File: a3\funcitons_f_mp_mark\revive\fn_reviveOnPlayerHandleDamageBasic.sqf
#include "defines.inc"

#define DEBUG_LOG		bis_fnc_logFormat

params ["_unit", "_selection", "_damage","_source","","_index"];

if (local _unit || {alive _unit}) then
{
	//kill player if he is in vehicle that blows up
	if (vehicle _unit != _unit && {!alive vehicle _unit}) exitWith
	{
		//["[x] Vehicle exploded, player should die..."] call DEBUG_LOG;

		forceRespawn _unit;

		SET_STATE(_unit,STATE_DEAD);

		MAX_SAFE_DAMAGE
	};

	if (IS_DISABLED(_unit)) then
	{
		if (_index == -1) then
		{
			//update damage value
			if (bis_revive_bleeding) then
			{
				private _damagePrev = damage _unit;
				private _damageRecieved = (_damage - _damagePrev) max 0.35;

				_unit setVariable [VAR_DAMAGE, (_unit getVariable [VAR_DAMAGE, 0]) + _damageRecieved];
			};
		};

		_damage = MAX_SAFE_DAMAGE min _damage;
	}
	else
	{
		//validate _source
		if (isNull _source) then
		{
			_source = missionNamespace getVariable ["bis_revive_lastAttacker",objNull];
		}
		else
		{
			bis_revive_lastAttacker = _source;
		};

		if (_damage >= 1 && {_index <= 7}) then
		{
			_damage = MAX_SAFE_DAMAGE;		//can be a different value if we dont want player to breath and cry in pain so much

			//check if unit is not in vehicle and there is at least one other friendly player with revive enabled; otherwise kill the unit
			if (vehicle _unit == _unit && {{REVIVE_ENABLED(GET_UNIT(_x)) && {side group _unit getFriend side group GET_UNIT(_x) >= 0.6}} count bis_revive_handledUnits > 0}) then
			{
				//["[x] Player should enter incapacitated state!"] call DEBUG_LOG;

				SET_STATE(_unit,STATE_INCAPACITATED);

				//award attacker with +1 'infantry kill' point
				[_source] spawn bis_fnc_reviveAwardKill;
			}
			//kill unit if there are no friendlies with enabled revive
			else
			{
				//["[x] Player should die!"] call DEBUG_LOG;

				forceRespawn _unit;

				SET_STATE(_unit,STATE_DEAD);
			};
		};

		//["[i] Damage returned: %1 @ %2",_selection,_damage] call DEBUG_LOG;
	};
};

_damage

 

 Also it might be worth to do the following (needs some work):

   _unit setVariable [VAR_REVIVE_ENABLED, false, true]; // Disables revive; Taken from "a3\funcitons_f_mp_mark\revive\fn_disableRevive.sqf"

I can't find the VAR_REVIVE_ENABLED anywhere. It has to be defined somewhere since variables can only be strings. I guess it is in the "defines.inc" which has to be somewhere in the folder with the other functions.

Share this post


Link to post
Share on other sites

O nice. I found the REVIVE_ENABLED in the functions viewer but had no idea how to access it. the format I found it in used  REVIVE_ENABLED(player,true/false)

 

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

×