Jump to content

Recommended Posts

 

Here the talking is about a script originally used in Dynamic Combat Ops missions by Dear mr. mbrdmn

 

 

Dear scripters please help)

 

I've took some folders with scripts from original DRO mission with sunday revive system, but faced another problem..

ma.ybe I took something wrong or run it not at proper manner, I've already broke my head 😞

 

Script only works fine at singleplayer/editor and only for me in multiplayer as I am a host, my friends cant revive anybody (not AI not me), but I can revive everyone, even friends.

 

so I get stucked......

The problem is how to run this script properly when I host game with my friends so the script sohuld work perfect for everybody.

 

so both my test mission and original from wehere I got the script is here in google drive

 

Any help will be appreciated, thanks guys

 


 

Spoiler

 

update 30.09.2018

 

 

On 9/30/2018 at 2:35 PM, GEORGE FLOROS GR said:

The progress so far :

 

Everything is working perfectly for the sever ( player ) and the AI of the group , in MP and SP but  ,

 

  • when a new player joins , in local host , then it is reseting everything ,
  • everyone dies the first time and then the script is working perfectly again.

I 'm adding the files below they are already reedited some stuff from me

and @Bansheevod and i will be very glad , if there is someone willing to help  !

 

Thanks !

 

The download link for the reedited version :

#temporary link

https://ufile.io/tv51s

 

 

PS : @Bansheevod can you add a video of this , if not the current , the latest ?

        thanks !

 

 

So as additional to GEORGE FLOROS's reply above 
I wish to confirm what we have the situation where:

 

Sunday revive script from Mark Boardman's DRO missions works perfect from mission starts in Singpleplayer;

in Multiplayer when player joins in local host game the script just goes mad and everyone starts dying the first time and then the script is working again. But looks like Ais still diyng even after been respawned, so script is working randomly for Ais.  Only works stable for players after they got one respawns previously, players don't die and always can be revived as should be.

 

 

So to clarify, I don't need the respawn feature in missions, won't be using it, need only the revive ability as it works in SP - no one dies, no respawns, only gets incapacitated and revives.

 

in other words - just need that script to work for MP such good as it works for SP.

 

So guys any help will be appriciated.
Thank you.

 

 

 

 

Spoiler

 

update 04.10.18

GEORGE made few improvements.

so our recent version is here - Google drive

 

changes:

script works from start and nobody dies!

but joined players still can't revive, their ability activates for person that force/respawned, as previous.

 

the one thing left is to give the ability to revive from start for joined players as the host has.

 

 

update 12.03.19

Our current version is here:  https://ufile.io/8s845

 

Current problem faced: 

Me(host) and joined internet/lan players: all die at the first time after first kill-shot, then have a respawn and after respawn bacome revivable. (script starts working correctly for live players after death)

We can revive each other.

 

About AI: AIs die if not after first shot but after second same as players, but after they got respawned they die too and after their death they lost ability to revive anyone or be revivable, they just die as regular unit and don't care about incapacitated units, seems like script stops working for them after they die.

 

it is important that playing alone even in MP as in SP the script works just fine BEFORE someone joins!!

Joined player "ruins" the script.

 

 

Video of the tests:

  • Like 1

Share this post


Link to post
Share on other sites

I don't think you can. I believe it's a single player script only will not work in multiplayer. Don't ask me why I fully don't understand really the difference between multiplayer versus single player scripting it makes my head hurt. I use BTC Quick Revive it works for multiplayer as well as single player a I will heal player. The only deficit of the script is did not have dragon carry functions. Avibird 

Share this post


Link to post
Share on other sites

We have already the best revive system ever by psychobastard

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, avibird 1 said:

I don't think you can. I believe it's a single player script only will not work in multiplayer. Don't ask me why I fully don't understand really the difference between multiplayer versus single player scripting it makes my head hurt. I use BTC Quick Revive it works for multiplayer as well as single player a I will heal player. The only deficit of the script is did not have dragon carry functions. Avibird 

 

The fact is player are local to their PC, none if dedicated one. Server is running all AIs stuff (if not delegate to headless client PC(s)). You can script on server for consistent variables like allUnits, allPlayers, playableUnits,.. but player (the variable / command) is "specific to the guy which manipulate the unit through the keyboard".

Commands / functions have, most of the time, arguments local or global (AL AG), and effects, local or global (EL EG). That's the main point to understand when scripting for MP.

I wrote something SP/MP compatible to revive/heal players or Ais... The hard choice is to define the medic, divert him from the group, then falling him back when task is done,.. if not killed. Hard time to manage all the cases! Feel free to dig in it.

 

 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@pierremgi does your scrip have the ability to allow the units to never die only stay incapacitated. I make a lot of missions Last Man Standing and the mission will end when all members of the team incapacitated. I was able to modify BTC Quick Revive a few years ago for my plane needs. 

 

@davidoss I have not tried AS wound system in a long time since the big rewrite. Is there a way to not allow playable units to die or bleed out only stay unconscious until revived or the mission ends when all playable units are unconscious. Then this is how I set up most of my missions for a small group of players I call it Last Man Standing gameplay this is how I prefer to play my missions. Granted Health packs are very limited and  hard to acquired during the mission ?

Share this post


Link to post
Share on other sites

No, but it's easy to do so. The problem is more the situation of incapacitated player, staying for hours without respawning, waiting for hypothetic care.

Share this post


Link to post
Share on other sites

@pierremgi well it's better then not having a chance to get back into the game lol. I am an old player from ofp days where we didn't really have respawns or revives you just became a bird and had to wait hours for the game to end. 

 

Now I never really liked respond options but do like the option of revives with the twist of Last Man Standing gameplay. The modified revive system that I use works great for single player I am able to team switch into another unit and revive all my playable units if possible however run into a problem with multiplayer only the host server me is able to switch into the other playable units when my character is incapacitated. The other players just sit incapacitated until I'm able to get to them which is not fun for the other players. 

 

I can take out the revive and just use respawn option number 5 that members only respond into a playable unit within the group that still alive and when all the AI units are used up there is no more ability to spawn back into another unit old school however I really enjoy playing Last Man Standing option with the ability to bring back all members.

 

If your script can be modified that the playable units never die only stay incapacitated BUT the other players have the ability to team switch when their unit is incapacitated to a non incapacitated AI  that is what I'm hoping for. My missions only have anywhere from 4 to  15 playable spots permission 

 

I would greatly appreciate it if you are script could be modified something like this. If not I need to continue looking for a solution when I play with other players. Like I said but my setup is perfect for single player but not so much for multiplayer. Thanks Avibird

Share this post


Link to post
Share on other sites
17 hours ago, avibird 1 said:

@pierremgi well it's better then not having a chance to get back into the game lol. I am an old player from ofp days where we didn't really have respawns or revives you just became a bird and had to wait hours for the game to end. 

If your script can be modified that the playable units never die only stay incapacitated BUT the other players have the ability to team switch when their unit is incapacitated to a non incapacitated AI  that is what I'm hoping for. My missions only have anywhere from 4 to  15 playable spots permission 

I would greatly appreciate it if you are script could be modified something like this. If not I need to continue looking for a solution when I play with other players. Like I said but my setup is perfect for single player but not so much for multiplayer. Thanks Avibird

 

If you are using the BI revive system, you need to set the bleedout duration. In 2den, it seems to be set at 5 min max. Not tested with reviveBleedOutDelay in description.ext

Try with this param, or wait for mission start and force the bleedout duration:
 

waitUntil {count allPlayers >0};
bis_revive_bleedOutDuration = 36000; // in sec

 

About my script, in parameters, you can modify what I called the "heal delay" ( 2nd param), which allows the units to stay unconscious (SP or MP non-players). But as far as players are concerned, the aim is to avoid overriding of mission MP params (so the script stay adapted to any mission, just affording some medic possibilities in MP and a whole SP stuff). For your demand, depending on:

- what you do with the BI revive system,

- what you need for AIs (AI unconsciousness, but also medic attempt for healing (how long he tries to heal and then stays out of the group)),  I need to rewrite all the script and it's not immediate.

 

Team switching on non-incapacitated units. it's another problem, all teamswitch commands/EHs working AFTER the switch. Workarounds with the units listbox are not very satisfactory.

As removeSwitchableUnits doesn't work in MP, so you can:

- kill the non-played (AI) switchable units to obtain a fine list;

- use the removeSwitchableUnits for SP...

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Script for specific long-lasting unconsciousness (overriding the bleedout delay for 10 hours). The second param becomes a period for attempting to call a medic.

 

Spoiler

 


MGI_fn_medic = compileFinal "
  _wnded = _this;
  private '_medic';
  _wnded setVariable ['myMedic',objNull];
  private _medics = MGI_potentialMedic select {
    _x distanceSqr _wnded < 40000
    && !isPlayer _x
    && _x != _wnded
    && alive _x
    && lifeState _x != 'incapacitated'
    && isNil {_x getVariable 'MGI_busy'}
  };
  call {
    if ({behaviour _x != 'COMBAT'} count _medics > 0) exitWith {
      _medics = _medics select {behaviour _x != 'COMBAT'};
      uiSleep (MGI_react/8);
    };
    if ({(_x targets [true, 300]) isEqualTo []} count _medics > 0) exitWith {
      _medics = _medics select {(_x targets [true, 300]) isEqualTo []};
      uiSleep (MGI_react/4);
    };
    if ({{_x == 'MediKit'} count (items _x) > 0} count _medics > 0) exitWith {
      _medics = _medics select {{_x == 'MediKit'} count (items _x) > 0};
      uiSleep MGI_react/2;
    };
    uiSleep MGI_react;
    _medics;
  };
  _medics = _medics select {
    _x distanceSqr _wnded < 40000
    && alive _x
    && lifeState _x != 'incapacitated'
    && isNil {_x getVariable 'MGI_busy'}
  };
  if (count _medics == 0) exitWith {
    _medic = objNull;
    _medic
  };
  _medics = _medics apply {[str(leader _x == _x),_x distance _wnded, _x]};
  _medics sort true;
  _medic = _medics select 0 select 2;
  _medic setHitPointDamage ['hitLegs',0];
  _medic setVariable ['MGI_busy',true,true];
  _wnded setVariable ['myMedic',_medic,true];
  if (count units _medic > 1) then {
    _medic setVariable ['MGI_AIgrp',group _medic,true];
    _medic setVariable ['isLeader', leader _medic == _medic,true];
  };
  _medic setVariable ['flee',_medic skill 'courage',true];
  _medic
";

MGI_fn_medicRelease = compileFinal "
  _medic = _this;
  uisleep 2;
  _medic setCaptive false;
  _medic allowFleeing (1 - (_medic getVariable ['flee',0.5]));
  {_medic enableAI _x} count ['target','autotarget','autocombat','suppression'];
  [_medic] joinSilent (_medic getVariable 'MGI_AIgrp');
  if (_medic getVariable ['isLeader',false]) then {
    [group _medic, _medic] remoteExec ['selectLeader', groupOwner (_medic getVariable 'MGI_AIgrp')];
  };
  _medic doFollow leader _medic;
  _medic setSpeedMode (speedMode group _medic);
  _medic setVariable ['MGI_busy',nil,true];
";

MGI_fn_checkMedic = compileFinal "
  params ['_wnded','_medic','_timer'];
  uiSleep 2;
  while {lifeState _wnded == 'incapacitated'} do {
    call {
    if (isnil '_medic' or isnil {_wnded getVariable 'myMedic'}) exitWith {
      _wnded call MGI_fn_medic;
    };
    if (!isNil {_wnded getVariable 'myMedic'} && {isnull (_wnded getVariable 'myMedic')}) exitWith {_wnded call MGI_fn_medic};
    if (lifeState _medic == 'incapacitated' or damage _medic >= 0.86) exitWith { };
    if (_wnded distance2D _medic < 3) exitWith {
      if (_wnded distanceSqr _medic > 9) then {
        waitUntil {sleep 0.5; unitReady _medic};
        _medic doMove getPosATL _wnded;
        uiSleep 5;
      };
      [_wnded,_medic,_timer] call MGI_fn_sortie;
    };
  };
    uisleep 2;
  };
  if (!isNil '_medic') then {_medic call MGI_fn_medicRelease};
  _wnded setVariable ['myMedic',nil,true];
  [_wnded,true] remoteExec ['allowDamage',_wnded];
";

MGI_fn_911 = compileFinal "
  params ['_wnded','_medic','_timer'];
  [_wnded,_medic,_timer] spawn MGI_fn_checkMedic;
  _medic setCaptive true;
  [_medic] joinSilent grpNull;
  {_medic disableAI _x} count ['target','autotarget','autocombat','suppression'];
  group _medic setBehaviour 'AWARE';
  _medic allowFleeing 0;
  _offset = [[0,0],[15, _wnded getRelDir _medic]] select (!isNull objectParent _medic);
  if (!isnull objectParent _medic) then {
    _medic setVariable ['veh',vehicle _medic,true];
    if !(_medic in [assignedDriver vehicle _medic,assignedGunner vehicle _medic]) then {
      unassignVehicle _medic;
      doGetOut _medic;
    };
  };
  _medic doMove (_wnded getpos _offset);
  uisleep 1;
  if (isnull objectParent _medic) then {
    group _medic setSpeedMode 'FULL'
  } else {
    group _medic setSpeedMode 'LIMITED'
  };
  [_wnded,_medic,_timer] call MGI_fn_heal;
";

MGI_fn_sortie = compileFinal "
  params ['_wnded','_medic','_timer'];
  call {
    if (lifeState _wnded == 'incapacitated' && diag_tickTime < _timer + MGI_BleedOut) exitWith {
      _azimuth = _medic getDir _wnded;
      _medic setDir _azimuth;
      _medic removeitem 'FirstAidKit';
      call {
        if (stance _medic == 'PRONE') exitWith {
          _medic playMove 'ainvppnemstpslaywrfldnon_medicother';
        };
        _medic playMove 'ainvpknlmstpslaywrfldnon_medicother';
      };
      uisleep 4;
      if (lifeState _medic != 'incapacitated' && alive _medic) then {
        if (_wnded call BIS_fnc_reviveEnabled) then {
          [['#rev',1,_wnded],BIS_fnc_reviveOnState] remoteExec ['call',_wnded];
          _wnded setCaptive true;
comment '[_wnded,false] remoteExec [""allowDamage"",_wnded]';
        } else {
          _wnded setDamage 0;
          _wnded setUnconscious false;
        };
        {if (['Heal Bros',(_wnded actionParams _x) select 0] call bis_fnc_inString) then {[ _wnded,_x] call BIS_fnc_holdActionRemove}} count (actionIDs _wnded);
        _wnded setVariable ['uncsious',false,true];
      };
      uisleep 2;
      _medic call MGI_fn_medicRelease;
      _wnded setVariable ['myMedic',nil,true];
      [_wnded,true] remoteExec ['allowDamage',_wnded];
      uiSleep 2;
      _wnded setCaptive false;
      {_x setDamage 1} forEach (( _wnded nearEntities ['CAManBase',20]) select {side _x getFriend side _wnded < 0.6 && side _x != civilian});
    };
    if (lifeState _wnded == 'incapacitated' && diag_tickTime > _timer + MGI_BleedOut) exitWith {
      _medic call MGI_fn_medicRelease;
      _wnded call MGI_fn_death;
    };
    comment 'uisleep (20 + MGI_react + MGI_BleedOut)';
    _medic call MGI_fn_medicRelease;
    [_wnded,true] remoteExec ['allowDamage',_wnded];
  };
";

MGI_fn_heal = compileFinal "
  params ['_wnded','_medic','_timer'];
  uisleep 3;
  waitUntil {Sleep 0.5; (unitReady vehicle _medic && canMove vehicle _medic) or {diag_tickTime > _timer + MGI_BleedOut && lifeState _wnded == 'incapacitated'}};
  if ((diag_tickTime > _timer + MGI_BleedOut) && lifeState _wnded == 'incapacitated') exitWith {
    _medic call MGI_fn_medicRelease;
    _wnded call MGI_fn_death;
  };
  doStop _medic;
  if (!isnull objectParent _medic) then {
    unassignVehicle _medic;
    doGetOut _medic;
  };
  _medic doMove getpos _wnded;
  _medic setSpeedMode 'FULL';
";

MGI_fn_death = compileFinal "
  params ['_wnded'];
  _wnded setVariable ['uncsious',false,true];
  _wnded setVariable ['myMedic',nil,true];
  [_wnded,true] remoteExec ['allowDamage',_wnded];
  if (!(_wnded call BIS_fnc_reviveEnabled)) then {_wnded setUnconscious false};
  _wnded setCaptive false;
 if (!isMultiplayer && isplayer _wnded) then {_wnded setDamage 0} else {
  _wnded setVariable ['myMedic',nil,true];
  _wnded setVariable ['uncsious',true,true];
  _wnded spawn MGI_fn_unconscious};
";


MGI_fn_unconscious = compileFinal  "
  params ['_unit'];
  waituntil {sleep 0.5; lifeState _unit == 'incapacitated'  or damage _unit == 1 or (!(_unit call BIS_fnc_reviveEnabled) && damage _unit >=0.86)};
  if (!(_unit call BIS_fnc_reviveEnabled)) then {
    [_unit,''] remoteExec ['switchMove'];
    _unit setUnconscious true;
  };
  if (lifeState _unit == 'incapacitated') then {
    _unit setCaptive true;
    if (!isNil {_unit getVariable ['MGI_busy',nil]}) then {
      [_unit,''] remoteExec ['switchMove'];
      _unit call MGI_fn_medicRelease
    };
comment '[_unit,false] remoteExec [""allowDamage"",_unit]';
    if (!isPlayer _unit) then {
      [_unit,'Heal Bros','\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa','\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa',
      '_this distance _target < 3 && lifeState _target == ""incapacitated"" ','_caller distance _target < 3',
      { call {
          if (stance _caller == 'PRONE') exitWith {
            _caller playMove 'ainvppnemstpslaywrfldnon_medicother';
          };
          _caller playMove 'ainvpknlmstpslaywrfldnon_medicother';
        };
      },
      {
       if ((diag_tickTime > (_this select 3 select 0) + MGI_react + MGI_BleedOut) && lifeState _target == 'incapacitated') then {
        (_target getVariable ['myMedic',objNull]) call MGI_fn_medicRelease;
        _target call MGI_fn_death;
        }
      },
      { if (_target call BIS_fnc_reviveEnabled) then {
          [['#rev',1,_target],BIS_fnc_reviveOnState] remoteExec ['call',_target];
          _target setCaptive true;
comment '[_target,false] remoteExec [""allowDamage"",_target]';
        } else {
          _target setDamage 0;
          _target setUnconscious false;
        };
        _target setVariable ['uncsious',false,true];
        (_target getVariable ['myMedic',objNull]) call MGI_fn_medicRelease;
        _target setVariable ['myMedic',objNull,true];
        [_target,true] remoteExec ['allowDamage',_target];
        uiSleep 7;
        _target setCaptive false;
      },
      { [_caller,''] remoteExec ['switchMove']
      },
      [diag_tickTime],5,12,true,false] remoteExec ['BIS_fnc_holdActionAdd',0,_unit];
    };
  };
  _timer = diag_tickTime;
  while {lifeState _unit == 'incapacitated' && diag_tickTime <= _timer + MGI_react + MGI_BleedOut} do {
    _unit setCaptive true;
    if (isnil {_unit getVariable 'myMedic'}) then {
      _medic = _unit call MGI_fn_medic;
      if (!isNull _medic) then {
        [_unit,_medic,_timer] call MGI_fn_911
      };
    };
    sleep 2;
  };
  if (lifeState _unit == 'incapacitated' && diag_tickTime > _timer + MGI_react + MGI_BleedOut) then {
    (_unit getVariable ['myMedic',objNull]) call MGI_fn_medicRelease;
    _unit call MGI_fn_death;
  };
  (_unit getVariable ['myMedic',objNull]) call MGI_fn_medicRelease;
  if (isnil {_unit getVariable ['MGI_busy',nil]}) then {_unit setCaptive false};
  [_unit,true] remoteExec ['allowDamage',_unit];
  _unit setVariable ['myMedic',nil,true];
";

MGI_fn_EHDamage = {
  params ["_unit"];
  _unit addEventHandler ["handleDamage", {
    params ["_unit","","_dam"];
    if (side _unit != sideEnemy) then {
      private _veh = objectParent _unit;
      if (!isnull _veh  && isNil {_veh getVariable ["incVeh",nil]} && (damage _veh > 0.7 or (!canfire _veh && !canMove _veh) or _dam > 0.7)) then {
        _veh setVariable ["incVeh",true];
        _crew = +(crew _veh);
        {
          if !(objectParent _x isKindOf "Steerable_Parachute_F") then {
            _x allowDamage false;
            moveOut _x;
            _x setCaptive true;
            [_x,_veh] spawn {
              params ["_unit","_veh"];
              if (!(backpack _unit isKindOf "B_parachute") && (getPosATL _veh select 2) > 30) then {
                sleep random 0.5;
                _p = createVehicle ["Steerable_Parachute_F", (getPosATL _unit) vectorAdd [0,0,1],[],0,"none"];
                sleep 0.1;
                _unit moveInDriver _p;
                _unit setBehaviour "COMBAT";
                sleep 1;
                if (isnull driver _p) then {
                  deleteVehicle _p;
                  if (!isplayer _unit) then { _unit setDamage 1};
                };
              }else {
                Sleep 3;
                if (isnull objectParent _unit && !isTouchingGround _unit) then {_unit setDamage 1};
              };
              if (leader _unit == _unit) then {
                group _unit addwaypoint [_veh getPos [10, _veh getRelDir leader _unit ],0, currentWaypoint group _unit];
              };
              sleep 3;
              if (!isNil {_veh getVariable ["incVeh",nil]}) then {_veh setVariable ["incVeh",nil,true]};
                [_unit,true] remoteExec ["allowDamage",_unit];
              _unit setCaptive false;
            };
          };
        } forEach _crew;
      };
      if (isNull objectParent _unit && {(count allPlayers == 1 && isPlayer _unit) or MGI_AiRevive}) then {
        if !(_unit getVariable ["uncsious",false]) then {
          _unit setVariable ["uncsious",true,true];
          _unit spawn MGI_fn_unconscious;
        };
        _dam min 0.86;
      };
    };
  }];
};


MGI_fn_Revive = {
  MGI_react = "react" call BIS_fnc_getParamValue;
  MGI_BleedOut = "bleedOut" call BIS_fnc_getParamValue;
  MGI_AiRevive = "NoReviveforAi" call BIS_fnc_getParamValue;
  MGI_AIKit = "AIKit" call BIS_fnc_getParamValue;
  MGI_AIMedicTrait = "AIMedicTrait" call BIS_fnc_getParamValue;
  MGI_bros = "bros" call BIS_fnc_getParamValue;
  if (MGI_react == 0) then {MGI_react = 120};
  if (MGI_BleedOut == 0) then {MGI_BleedOut = 120};
  if (MGI_AiRevive == 0) then {MGI_AiRevive = true};
  if (MGI_AIMedicTrait == 0) then {MGI_AIMedicTrait = false};
  if (MGI_bros == 0) then {MGI_bros = switchableUnits+playableUnits};

  params [["_react",MGI_react,[0]],["_bleedOut",MGI_BleedOut,[0]],["_AiRevive",MGI_AiRevive,[true]],["_kit",MGI_AIKit,[0]],["_AIMedicTrait",MGI_AIMedicTrait,[true]],["_MGI_bros",MGI_bros,[[],WEST,objNull]]];
  MGI_react = _react;
  MGI_BleedOut = _bleedOut;
  MGI_AiRevive = _AiRevive;
  MGI_AIKit = _kit;
  MGI_AIMedicTrait = _AIMedicTrait;

  if (!isNil "bis_revive_bleedOutDuration" && {bis_revive_bleedOutDuration != 36000}) then {bis_revive_bleedOutDuration = 36000};

  _MGI_bros spawn {
    params ["_MGI_bros","_bros"];
    if (_MGI_bros isEqualType objNull) then {
      _bros = [_MGI_bros];
      MGI_bros = _bros;
      MGI_potentialMedic = MGI_bros
    } else {
    while {true} do {
    call {
      if (_MGI_bros isEqualType WEST) exitWith {

        {_x setVariable ["passedBros",true]} forEach (allUnits select {side _x == _MGI_bros && isnil {_x getVariable "passedBros"}});
      };
      if (allPlayers isEqualTo (switchableUnits + playableUnits)) exitWith {
          {_x setVariable ["passedBros",true]} forEach  (allPlayers select {isnil {_x getVariable "passedBros"}});
        };
      if (_MGI_bros isEqualTypeAll objNull) then {
       {_x setVariable ["passedBros",true]} forEach (_MGI_bros select {isnil {_x getVariable "passedBros"}});
      };
    };
    _bros = allUnits select {(_x getVariable ["passedBros",nil])};
    {
      if (isnil {_x getVariable ["passEH",nil]}) then {
        _x call MGI_fn_EHDamage;
        _x setVariable ["passEH", _x addEventHandler ["respawn",{
          (_this select 0) setVariable ['uncsious',false,true];
          (_this select 0) setVariable ["passedBros",true];
          (_this select 1) setVariable ["passedBros",nil];
        }]]
      }
    } forEach _bros;
    MGI_bros = +_bros;
    MGI_potentialMedic = MGI_bros select {
    [true,{_x == "FirstAidKit"} count (items _x) >0,{_x == "MediKit"} count (items _x) >0] select MGI_AIKit
    && [true,_x getUnitTrait "Medic"] select MGI_AIMedicTrait
    };
    uiSleep 5;
    };
  };
  };
    };
[30,60,true,0,false,west] call MGI_fn_Revive;

 

 

 

 

 

I don't recommend this script for normal usage (possibility to be unconscious for hours).

  • Like 1

Share this post


Link to post
Share on other sites

Dear scripters please help)

 

I've took some folders with scripts from original DRO mission with sunday revive system, but faced another problem..

maybe I took something wrong or run it not at proper manner, I've already broke my head :(

 

Script only works fine at singleplayer/editor and only for me in multiplayer as I am a host, my friends cant revive anybody (not AI not me), but I can revive everyone, even friends.

 

so I get stucked......

The problem is how to run this script properly when I host game with my friends so the script sohuld work perfect for everybody.

 

so both my test mission and original from wehere I got the script is here in google drive

 

Any help will be appreciated, thanks guys.

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, GEORGE FLOROS GR said:

 

Does the revive work in the original mission in MP?

Yes sure, fine when I host it, all could revive.

 

I'm sure that I made something wrong, but donno what exactly. 

  • Like 1

Share this post


Link to post
Share on other sites
6 minutes ago, Lucullus said:

Read the comments and switch to the recommended revive-systems above...

at your link there is an addon but I try here to get files work from original mission, which works perfectly at multiplayer.

 

that addon from your link never worked online, it is singleplayer only. 

different things

Share this post


Link to post
Share on other sites

Sorry, I did not know that there is a Sunday Revive script package.
Unfortunately I can not start your example mission, do you already have something working?

 

It's better to ask the author how he integrated his script package.

  • Like 1

Share this post


Link to post
Share on other sites
29 minutes ago, Lucullus said:

Unfortunately I can not start your example mission, do you already have something working?

whats the error?

 

Yes as I said before

22 hours ago, Bansheevod said:

Script only works fine at singleplayer/editor and only for me in multiplayer as I am a host, my friends cant revive anybody (not AI not me), but I can revive everyone, even friends.

It is works only for the HOST, only host have all privileges :(

 

so It is working! but I dont know how to give privileges to all on my host server.

 

29 minutes ago, Lucullus said:

It's better to ask the author how he integrated his script package.

I can't reach for him unfortunately... If I could ofcourse I would ask him first. :down:

 

Share this post


Link to post
Share on other sites
25 minutes ago, Lucullus said:

Unfortunately I can not start your example mission

Thats strange I've just downloaded it and everything starts fine....or you mean you do not have the opportunity for now?))

Share this post


Link to post
Share on other sites
15 hours ago, Bansheevod said:
22 hours ago, GEORGE FLOROS GR said:

 

Does the revive work in the original mission in MP?

Yes sure, fine when I host it, all could revive.

 

I'm sure that I made something wrong, but donno what exactly. 

 

Ok , hold on ,

So on the original mission everything is working fine in MP ? ,

 

BUT,

when you used  these files to your mission , then the revive was broken.

 

Right?

 

If so , is this script available or you need to drag this out of this mission?

If you have used the certain then there might be an error.

 

So else , if this script is working fine tested alone or inside the original mission in MP,  then it might interfere with any other files or addons , included to your mission.

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, GEORGE FLOROS GR said:

 

Ok , hold on ,

So on the original mission everything is working fine in MP ? ,

 

BUT,

when you used  these files to your mission , then the revive was broken.

 

Right?

 

Yes my mission fails at multiplayer. 

 

1 hour ago, GEORGE FLOROS GR said:

If so , is this script available or you need to drag this out of this mission?

If you have used the certain then there might be an error.

Not sure I clearly understand what are you talking about, I just simply drag and drop some files to my mission from the original one, and then made an init.sqf to execute it. You can look them at google disk link above. 

Original mission has several folders with many scripts, so I think maybe made a mistake there, take the wrong files or maybe forgot some scripts, or maybe don't have the correct init lines.... Have no idea(((

 

1 hour ago, GEORGE FLOROS GR said:

So else , if this script is working fine tested alone or inside the original mission in MP,  then it might interfere with any other files or addons , included to your mission.

Tested what I have made, the results are

 

Sp/editor - everything works fine

Multiplayer - when player joins it fails... 

 

I always run it without any addons/mods, just clear arma... So nothing to conflict with

 

 

  • Like 1

Share this post


Link to post
Share on other sites

So the conclusion is that it's working in MP in the original mission.

 

I will take also a look at the files and i will send them back in private.

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, GEORGE FLOROS GR said:

So the conclusion is that it's working in MP in the original mission.

 

I will take also a look at the files and i will send them back in private.

 

yea, thanks alot man!

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Bansheevod said:

yea, thanks alot man!

 

Ok Bansheevod !

 

I had some time , so i will send you now in a message the files , but you need to test this , because unfortunatelly ,i can't !

 

If it's ok post the solution and add a link for the others too !

 

  • Like 1

Share this post


Link to post
Share on other sites

The progress so far :

 

Everything is working perfectly for the sever ( player ) and the AI of the group , in MP and SP but  ,

 

  • when a new player joins , in local host , then it is reseting everything ,
  • everyone dies the first time and then the script is working perfectly again.

I 'm adding the files below they are already reedited some stuff from me

and @Bansheevod and i will be very glad , if there is someone willing to help  !

 

Thanks !

 

The download link for the reedited version :

#temporary link

https://ufile.io/tv51s

 

 

PS : @Bansheevod can you add a video of this , if not the current , the latest ?

        thanks !

 

  • Thanks 1

Share this post


Link to post
Share on other sites
9 hours ago, GEORGE FLOROS GR said:

The progress so far :

 

Everything is working perfectly for the sever ( player ) and the AI of the group , in MP and SP but  ,

 

  • when a new player joins , in local host , then it is reseting everything ,
  • everyone dies the first time and then the script is working perfectly again.

I 'm adding the files below they are already reedited some stuff from me

and @Bansheevod and i will be very glad , if there is someone willing to help  !

 

Thanks !

 

The download link for the reedited version :

#temporary link

https://ufile.io/tv51s

 

 

PS : @Bansheevod can you add a video of this , if not the current , the latest ?

        thanks !

 

 

So as additional to GEORGE FLOROS's reply above 
I wish to confirm what we have the situation where:

 

  • Sunday revive script from Mark Boardman's DRO missions works perfect from mission starts in Singpleplayer;
  • in Multiplayer when player joins in local host game the script just goes mad and everyone starts dying the first time and then the script is working again. But looks like Ais still diyng even after been respawned, so script is working randomly for Ais.  Only works stable for players after they got one respawns previously, players don't die and always can be revived as should be.

 

 

So to clarify, I don't need the respawn feature in missions, won't be using it, need only the revive ability as it works in SP - no one dies, no respawns, only gets incapacitated and revives.

 

in other words - just need that script to work for MP such good as it works for SP.

 

So guys any help will be appriciated.
Thank you.

 

 

also I've made a video to the recent mission edit, that may help to understand the problem from my eyes

 

  • Thanks 1

Share this post


Link to post
Share on other sites

GEORGE made few improvements.

so our recent version is here - https://ufile.io/ixgy5

 

changes:

  • script works from start and nobody dies!

 

but joined players still can't revive, player's revive ability activates only on person that died(forcerespawned/suicided) and respawned.

also connected player can't revive soldiers that haven't die before.

 

the one thing left is to give the ability to revive from start for joined players as the host has.

 

 

  • Like 1

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

×