Jump to content

[HowTo] EVR BlowOut map independent


jOoPs

Recommended Posts

Runs great, thanks for this  :)

 

Question - is there any way to remove the knockout effect on players? I like the ambience effect of EVR, but it could be impractical with tons of AI running around if they're not affected by it...

 

This seems relevant, but I'm guessing it's more complicated than just tweaking a couple of lines.

r_player_inpain = true;
player setVariable["USEC_inPain",true,true];

edit: more specifically, remove the knockout when a player is in a building

Link to comment
Share on other sites

Any way of detecting if an Epoch building is above a player's head?

 

Also, the blackscreen fading needs to be gone for players who have an APSI or are inside a building.

 

The black screen is part of the global effect. The apsi device only protects you from damage, it doesn't stop the event from happening.

Link to comment
Share on other sites

The black screen is part of the global effect. The apsi device only protects you from damage, it doesn't stop the event from happening.

 

Yes, but the input block + 3 seconds blackscreen can be really annoying for someone who isn't meant to be affected (people indoors, people with an APSI).

 

Personally, I globally removed the blackscreen fading and limited input block to players who don't wear an APSI.

Gonna test the AI adapter on my test server asap.

Link to comment
Share on other sites

Please don't apologise for that, your health is more important than our pixels. Also which part would i have to change to remove the blackout from players with protection?.

 

Regards

u might replace the part from line 510 in blowout_client.sqf with this , the apsi owner doesnt falldown gets device input and vision

 

//    _bul = [] call bl_local_anims;  // this is where the player falls down to the ground , i only set it for the non apsi player

    sleep 0.1;

    playSound "bl_full";

    sleep 0.1;

//    titleText["","BLACK OUT",1];   // these 2 fall under the !protect statement

//    disableUserInput true;

if(ns_blowout_dayz) then {

        private["_isinbuilding","_protect"];

        _isinbuilding = false;

        _protect = false;

        if (player hasWeapon ns_blow_itemapsi) then {

            _protect = true;

        };

        

        if (!_protect) then {

            _bul = [] call bl_local_anims;

            titleText["","BLACK OUT",1];

            disableUserInput true;

                sleep 1;

                4 fadeSound 0;

                sleep 30;

        };

            if([player] call fnc_isInsideBuilding) then {

            _isinbuilding = true;

        };

            if (!(player hasWeapon ns_blow_itemapsi)) then {

                        diag_log format["[NAC BLOWOUT CLIENT] :: Player does not have APSI"];

            if (!_isinbuilding) then {

                diag_log format["[NAC BLOWOUT CLIENT] :: Player does not have APSI and is not in a building"];

                    r_player_inpain = true;

                    player setVariable["USEC_inPain",true,true];

                    if (r_player_blood > 12000) then {

                        r_player_blood = 12000;

                    };

                    r_player_blood = r_player_blood - ns_blow_playerdamage;

                    player setVariable["USEC_BloodQty",r_player_blood,true];

                    diag_log format["[NAC BLOWOUT CLIENT] :: player has been damaged by blowout by 0.15"];

            } else {

                    if (r_player_blood > 12000) then {

                        r_player_blood = 12000;

                        player setVariable["USEC_BloodQty",r_player_blood,true];

                    };

                    r_player_inpain = true;

                    player setVariable["USEC_inPain",true,true];

                diag_log format["[NAC BLOWOUT CLIENT] :: but is in some building, good for him."];

            };

            } else {

            diag_log format["[NAC BLOWOUT CLIENT] :: Player does have APSI, I do not have problem with him."];

        };

            

};

    

    

    6 fadeSound 1;

    titleText["","BLACK IN",10];

    ppEffectDestroy _nonapsi_ef;

    waitUntil {!ns_blow_action};

    diag_log format["[NAC BLOWOUT CLIENT] :: ns_blow_action = %1 Blowout actions end received.", ns_blow_action];

    if(!ns_blowout_dayz) then { 120 setOverCast _puvodni_pocasi; };

 

// till here line 564

 

if (worldName == "namalsk") then {

Link to comment
Share on other sites

 

In the last two blocks you can see the EMP function in action, it damages vehicles a little and breaks NV goggles and GPS etc.

Unfortunately it's stated that it only works on Namalsk, I think it's got a couple of functions that are native to the map and the "broken" items aren't in DayZ by default.

 

If you could patch it up yourself to work with other maps (maybe changing if (worldName == "namalsk") ?), I guess that'd work perfectly for what you need.

bl_damage = {
	private["_isinbuilding","_emp"];
	_emp = _this select 0;
	//_count_units = count playableUnits;
	_count_units = count playableUnits;
	_isinbuilding = false;
	diag_log format["[NAC BLOWOUT SERVER] :: bl_damage (_count_units = %1)", _count_units];
	for [{_c = 0}, {_c <= _count_units}, {_c = _c + 1}] do {
		//_jednotka = playableUnits select _c;
		_jednotka = AllUnits select _c;
		if (!isNull _jednotka) then {
			if([_jednotka] call fnc_isInsideBuilding) then {
				_isinbuilding = true;
				diag_log format["[NAC BLOWOUT SERVER] :: [s] %1 IN", _isinbuilding];
			} else {
				_isinbuilding = false;
				diag_log format["[NAC BLOWOUT SERVER] :: [s] %1 OUT", _isinbuilding];
			};
			
			if (!(_jednotka hasWeapon ns_blow_itemapsi)) then {
				diag_log format["[NAC BLOWOUT SERVER] :: [s] %1 does not have APSI", _jednotka];
				if (!_isinbuilding) then {
					diag_log format["[NAC BLOWOUT SERVER] :: [s] and %1 is not in a building, sorry.", _jednotka];
					_jednotka setDamage (damage _jednotka + 0.30);
					diag_log format["[NAC BLOWOUT SERVER] :: [s] %1 has been damaged by blowout by 0.30", _jednotka];
				} else {
					diag_log format["[NAC BLOWOUT SERVER] :: [s] but %1 is in some building, good for him.", _jednotka];
				};
			} else {
				diag_log format["[NAC BLOWOUT SERVER] :: [s] %1 does have APSI, I do not have problem with him.", _jednotka];
			};
if (worldName == "namalsk") then {
	      if (_emp == 1) then {
	       if (_jednotka hasWeapon "NVGoggles") then {
	         _jednotka removeWeapon "NVGoggles";
	         _jednotka addWeapon "BrokenNVGoggles"; 
	       };
	       if (_jednotka hasWeapon "ItemGPS") then {
	         _jednotka removeWeapon "ItemGPS";
	         _jednotka addWeapon "BrokenItemGPS"; 
	       };
	       if (_jednotka hasWeapon "ItemRadio") then {
	         _jednotka removeWeapon "ItemRadio";
	         _jednotka addWeapon "BrokenItemRadio"; 
	       };
	      };
};
	    };
	    //_count_units = count playableUnits;
    };
    if (_emp == 1) then {
      _count_vehicles = count vehicles;
      diag_log format["[NAC BLOWOUT SERVER] :: bl_damage (_count_vehicles = %1)", _count_vehicles];
      for [{_c = 0}, {_c <= _count_vehicles}, {_c = _c + 1}] do {
        _vehikl = vehicles select _c;
        if (_vehikl isKindOf "AllVehicles") then {
          if ((damage _vehikl) <= 0.99) then {
            //_vehikl setDamage 0.9;
            //_vehikl setFuel 0;
            diag_log format["[NAC BLOWOUT SERVER] :: [V] %1 has been damaged by blowout by 0.90", _vehikl];
          };  
        };
      };    
    };
};
Link to comment
Share on other sites

hmm that is weird. On my server it is spot on every time...

 

The delay modifier only makes sure the (_delay = *****) timer varies. usually somewhere between 40 and 70 minutes where it hits.

Obviously server restarts cancel the sequence and will restart the timer on startup again. 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Advertisement
×
×
  • Create New...