Jump to content
Rosso777

Trying to fix Happy's Enigma Revive System

Recommended Posts

Been using Happy's Enigma Revive System for a long time on my private family server (origin: https://github.com/hpy/Enigma_Exile_Revive). There are two major issues which I cannot seem to crack given my very limited coding experience.

 

The first issue lies here. Trying to get the "PERFORM CPR" option to show up when looking at a downed player is SO finicky that it flashes here and there and is so inconsistent that it costs lives as we're trying to revive someone and getting blasted ourselves because its so hard to find the option. Here is the original code:

 

Spoiler

_target = _this select 0;

_targetname = name _target;

_bodypos1 = [0.75,0.15,0];

_bodypos2 = [-0.75,0.1,0];

_bodypos3 = [0,0.08,0];

_healPlace = "_bodypos1";

_action = "medicStartRightSide";

_bodypos = _bodypos1;

_animstate = animationState _target;

_primaryw = primaryWeapon player;

_timer = 6;

_Anims = ["ainvpknlmstpsnonwrfldnon_ainvpknlmstpsnonwrfldnon_medic"];

_defibpos = [0.4,0.9,0];

_defibangle = 30;

 

if ((player distance (_target modelToWorld _bodypos2))<((_target modelToWorld _bodypos1) distance player)) then

{

_healPlace = "_bodypos2";

_action = "medicStart";

_bodypos = _bodypos2;

_defibpos = [0,0.9,0];

_defibangle = 180;

};

player attachTo [_target, _bodypos];

_posh = player modelToWorld [0,0,0];

_posi = _target modelToWorld _bodypos3;

_dy = (_posh select 1) - (_posi select 1);

_dx = (_posh select 0) - (_posi select 0);

_dir = getDir player;

player setDir (270 - (_dy atan2 _dx) - direction _target);


Here is a direct link to the full file: https://github.com/hpy/Enigma_Exile_Revive/blob/master/Exile.Altis/Custom/EnigmaRevive/Enigma_RevivePlyr.sqf
 

I've tried SO MANY variations of uncommenting this section (where applicable) and simply trying to make it so if the player is < 3 meters, the option arises (note: the option is coded in the config.cpp and does not have anything to do with distance, etc., so I won't post here.

 

The second issue is that when player's are revived, the lose all of their handgun ammo. Here is the code:

 

Spoiler

_magazinesAmmo = magazinesAmmo _requestingPlayer;

_handgunammo = _requestingPlayer ammo handgunWeapon _requestingPlayer;

_handguntype = handgunWeapon _requestingPlayer;

 

Here is a direct link to the full file: https://github.com/hpy/Enigma_Exile_Revive/blob/master/%40Enigma/addons/enigma_exile_revive/compile/Enigma/Exile_RevivePlayer.sqf

 

Something seems wrong with that second line, but no matter which way I've tried it (changing to _HandgunMagazine according to the BIKI), I cannot seem to get players to have their secondary ammo once they have been revived.

 

And even though I think this last piece is an ARMA issue and not a mod issue, I wonder if there's a way to make it so players do not drop their weapons when they die/get revived?

 

 

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

×