Jump to content

[Release] Walk Amongst The Dead - (Hide from zombies like "The Walking Dead")


Sandbird

Recommended Posts

13 hours ago, Sandbird said:

It is possible....but i stopped playing Arma :/ I dont even have the game installed anymore to test it.

Basically you check if the player is inside a vehicle...and if he is, you exit from the main rain check loop. But i cant be sure to blindly write code for it.

The check for 'if player is inside vehicle' is :


if (vehicle player == player) then {};

Try changing the whole function sand_cleanCheck in walkamongstthedead.sqf to this:

 


sand_cleanCheck = {
private ["_isRain","_RefillTime","_countdown","_RainAmt","_startRefillTime","_onLadder","_canDo","_playerPos","_isWater","_canClean","_isPond","_isWell","_pondPos","_objectsWell","_objectsPond","_pondNear","_wellNear","_isInVehicle"];
	while {true} do {
		if(hasGutsOnHim and (!sand_washed)) then {
				 scopeName "rainloop";
			  _onLadder 	= (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
			  _canDo    	= (!r_drag_sqf and !r_player_unconscious and !_onLadder);
				_playerPos 	= getPosATL player;
				_isWater		= dayz_isSwimming;  //(surfaceIsWater _playerPos) or 
				_isInVehicle = vehicle player != player;
				_canClean		= count nearestObjects [_playerPos, DZ_waterSources, 4] > 0;
	      _isPond = false;
	      _isWell = false;
	      _pondNear = false;
	      _wellNear = false;
	      _pondPos = [];
	      _objectsWell = [];
				_isRain = false;
				if ((!hasGutsOnHim) and sand_washed) then {breakOut "rainloop";};
				if (_isWater) exitwith { cutText [format["You have successfully washed away the zombie parts from your body."], "PLAIN DOWN"]; call sand_endScript;};
				if ((time - DZ_ZCAMO_STARTTIME) > DZ_ZCAMO_USE_TIME and (DZ_ZCAMO_USE_TIME > 0)) exitwith { cutText [format["The zombie camo has faded away."], "PLAIN DOWN"]; call sand_endScript; breakOut "rainloop";};
	
				// Gather global weather (rain) variable; ranges from 0 to 1 (none to very, very hard rain)
				_RainAmt = drn_var_DynamicWeather_Rain; // referenced from \z\addons\dayz_code\system\DynamicWeatherEffects.sqf
				
				// If global rain amount is higher than 0, then set flag isRain to true
				if (_RainAmt > 0) then { _isRain = true; };
				
				_objectsPond = nearestObjects [_playerPos, [], 20];
				{
				//Check for pond
				_isPond = ["pond",str(_x),false] call fnc_inString;
				if (_isPond) then {
					_pondPos = (_x worldToModel _playerPos) select 2;
					if (_pondPos < 0) then {
						_pondNear = true;
					};
				};
				} forEach _objectsPond;
				
				_objectsWell = nearestObjects [_playerPos, [], 4];
				{
				//Check for Well
				_isWell = ["_well",str(_x),false] call fnc_inString;
				if (_isWell) then {_wellNear = true};
				} forEach _objectsWell;
				
				
				if(!isNull player) then {
				  if((speed player <= 1) && (_canClean || _pondNear || _wellNear) && _canDo) then {
				      if (s_player_cleanguts < 0) then {
				          s_player_cleanguts = player addaction["<t color=""#ff4444"">" + "Clean Guts" + "</t>","custom\walkamongstthedead\usewatersupply.sqf","",5,false,true,"",""];
				      };
				  } else {
				      player removeAction s_player_cleanguts;
				      s_player_cleanguts = -1;
				  };
				};
	
				// It's raining! Remove the zombie parts
				if (!dayz_inside and _isRain and hasGutsOnHim and !_isInVehicle) then {
				  
				  // Set initial loop variables
				  _startRefillTime = time;
				  r_interrupt = false;
				  r_doLoop = true;
				   
				  // Set refill time depending upon degree of rain (heavy, medium, or light)
				  _RefillTime = DZ_ZCAMO_LightRainLoseCamo; // set as default
				  if (_RainAmt > 0.53) then { // heavy rain
					_RefillTime = DZ_ZCAMO_HeavyRainLoseCamo; };
				  if (_RainAmt > 0.25) then { // medium rain
				    _RefillTime = DZ_ZCAMO_MediumRainLoseCamo; }; 
				  if (_RainAmt < 0.25) then { // light rain
				    _RefillTime = DZ_ZCAMO_LightRainLoseCamo; }; 
				  
				  _countdown = _RefillTime;
				  // Loop thru required time to fill and check for interruptions
					while {r_doLoop} do { 
						if (!dayz_inside) then {
							_countdown = (_countdown - 1);
							// Inform the player how long it will take till camo wears off
							if ((time - _startRefillTime) <= _RefillTime) then {
									 cutText [format["Its raining. Your zombie camo is getting washed away in %1 seconds.\nQuickly! Get inside a building.",str(_countdown)], "PLAIN DOWN"];
							} else {    
									cutText [format["Your zombie camo got washed away by the rain."], "PLAIN DOWN"];
									sand_washed = true;
									hasGutsOnHim = false;  
									r_doLoop = false;
							};
							_RainAmt = drn_var_DynamicWeather_Rain; // Check for rain stopping
							
							if (_RainAmt < 0.025) exitWith {
								cutText [format["The rain has stopped. Your zombie camo didnt wash off."], "PLAIN DOWN"];
								r_doLoop = false;
							};
						};
			      if (dayz_inside) exitWith {
							cutText [format["Good, your zombie camo is safe now."], "PLAIN DOWN"];
							r_doLoop = false;
			      };
				  sleep 1;          
					}; // end (timed) while loop
				};
		}else{
			if (dayz_combat != 1) then {hasGutsOnHim = true;  player removeAction s_player_cleanguts; s_player_cleanguts = -1;};
			if (sand_washed) then {call sand_endScript;};		
		};
		sleep 1;
	};
};

 

This should check if the player is inside a vehicle and if he is, it wont wash the camo away.
The motorcycle/atv etc is far more difficult to do it blindly...I am not even sure if this would work to tell you the truth :/

 

 

That's a no go @Sandbird. Anything else i can try?

Link to comment
Share on other sites

18 minutes ago, chi said:

That's a no go @Sandbird. Anything else i can try?

Hmmm, What exactly happens ? You put the camo on, then get in the car and the "Its raining. Your zombie camo is getting washed away" text is coming out ? Or does it immediately wash away ?

Since i cant test it you have to be my live log file :P

Link to comment
Share on other sites

6 hours ago, chi said:

@Sandbird It just continues to count down as usual. No errors or anything, just business as usual.


Oh wait...This changes everything then...Replace that last function i gave you to this:


sand_cleanCheck = {
private ["_isRain","_RefillTime","_countdown","_RainAmt","_startRefillTime","_onLadder","_canDo","_playerPos","_isWater","_canClean","_isPond","_isWell","_pondPos","_objectsWell","_objectsPond","_pondNear","_wellNear","_isInVehicle"];
	while {true} do {
		if(hasGutsOnHim and (!sand_washed)) then {
				 scopeName "rainloop";
				_onLadder 	= (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
				_canDo    	= (!r_drag_sqf and !r_player_unconscious and !_onLadder);
				_playerPos 	= getPosATL player;
				_isWater		= dayz_isSwimming;  //(surfaceIsWater _playerPos) or 
				_isInVehicle = vehicle player != player;
				_canClean		= count nearestObjects [_playerPos, DZ_waterSources, 4] > 0;
	      _isPond = false;
	      _isWell = false;
	      _pondNear = false;
	      _wellNear = false;
	      _pondPos = [];
	      _objectsWell = [];
				_isRain = false;
				if ((!hasGutsOnHim) and sand_washed) then {breakOut "rainloop";};
				if (_isWater) exitwith { cutText [format["You have successfully washed away the zombie parts from your body."], "PLAIN DOWN"]; call sand_endScript;};
				if ((time - DZ_ZCAMO_STARTTIME) > DZ_ZCAMO_USE_TIME and (DZ_ZCAMO_USE_TIME > 0)) exitwith { cutText [format["The zombie camo has faded away."], "PLAIN DOWN"]; call sand_endScript; breakOut "rainloop";};
	
				// Gather global weather (rain) variable; ranges from 0 to 1 (none to very, very hard rain)
				_RainAmt = drn_var_DynamicWeather_Rain; // referenced from \z\addons\dayz_code\system\DynamicWeatherEffects.sqf
				
				// If global rain amount is higher than 0, then set flag isRain to true
				if (_RainAmt > 0) then { _isRain = true; };
				
				_objectsPond = nearestObjects [_playerPos, [], 20];
				{
				//Check for pond
				_isPond = ["pond",str(_x),false] call fnc_inString;
				if (_isPond) then {
					_pondPos = (_x worldToModel _playerPos) select 2;
					if (_pondPos < 0) then {
						_pondNear = true;
					};
				};
				} forEach _objectsPond;
				
				_objectsWell = nearestObjects [_playerPos, [], 4];
				{
				//Check for Well
				_isWell = ["_well",str(_x),false] call fnc_inString;
				if (_isWell) then {_wellNear = true};
				} forEach _objectsWell;
				
				
				if(!isNull player) then {
				  if((speed player <= 1) && (_canClean || _pondNear || _wellNear) && _canDo) then {
				      if (s_player_cleanguts < 0) then {
				          s_player_cleanguts = player addaction["<t color=""#ff4444"">" + "Clean Guts" + "</t>","custom\walkamongstthedead\usewatersupply.sqf","",5,false,true,"",""];
				      };
				  } else {
				      player removeAction s_player_cleanguts;
				      s_player_cleanguts = -1;
				  };
				};
	
				// It's raining! Remove the zombie parts
				if (!dayz_inside and _isRain and hasGutsOnHim and !_isInVehicle) then {
				  
				  // Set initial loop variables
				  _startRefillTime = time;
				  r_interrupt = false;
				  r_doLoop = true;
				   
				  // Set refill time depending upon degree of rain (heavy, medium, or light)
				  _RefillTime = DZ_ZCAMO_LightRainLoseCamo; // set as default
				  if (_RainAmt > 0.53) then { // heavy rain
					_RefillTime = DZ_ZCAMO_HeavyRainLoseCamo; };
				  if (_RainAmt > 0.25) then { // medium rain
				    _RefillTime = DZ_ZCAMO_MediumRainLoseCamo; }; 
				  if (_RainAmt < 0.25) then { // light rain
				    _RefillTime = DZ_ZCAMO_LightRainLoseCamo; }; 
				  
				  _countdown = _RefillTime;
				  // Loop thru required time to fill and check for interruptions
					while {r_doLoop} do { 
						if (!dayz_inside and !_isInVehicle) then {
							_countdown = (_countdown - 1);
							// Inform the player how long it will take till camo wears off
							if ((time - _startRefillTime) <= _RefillTime) then {
									 cutText [format["Its raining. Your zombie camo is getting washed away in %1 seconds.\nQuickly! Get inside a building.",str(_countdown)], "PLAIN DOWN"];
							} else {    
									cutText [format["Your zombie camo got washed away by the rain."], "PLAIN DOWN"];
									sand_washed = true;
									hasGutsOnHim = false;  
									r_doLoop = false;
							};
							_RainAmt = drn_var_DynamicWeather_Rain; // Check for rain stopping
							
							if (_RainAmt < 0.025) exitWith {
								cutText [format["The rain has stopped. Your zombie camo didnt wash off."], "PLAIN DOWN"];
								r_doLoop = false;
							};
						};
			      if (dayz_inside or _isInVehicle) exitWith {
							cutText [format["Good, your zombie camo is safe now."], "PLAIN DOWN"];
							r_doLoop = false;
			      };
				  sleep 1;          
					}; // end (timed) while loop
				};
		}else{
			if (dayz_combat != 1) then {hasGutsOnHim = true;  player removeAction s_player_cleanguts; s_player_cleanguts = -1;};
			if (sand_washed) then {call sand_endScript;};		
		};
		sleep 1;
	};
};

 

This should work now!

Link to comment
Share on other sites

@Sandbird I tried the last post, and now when im in a vehicle, the countdown timer message blinks twice for each number in the countdown. But still, it just washes off even when I get in the vehicle. :(

 

Is this line

_isInVehicle = vehicle player != player;

supposed to have the ! or another =

like this

_isInVehicle = vehicle player == player;

 

 

Link to comment
Share on other sites

2 hours ago, chi said:

@Sandbird I tried the last post, and now when im in a vehicle, the countdown timer message blinks twice for each number in the countdown. But still, it just washes off even when I get in the vehicle. :(

 

Yeah, you are setting a condition to variable _isInVehicle.If you see here: https://community.bistudio.com/wiki/vehicle  
You'll see : if (vehicle player != player) then {hint "Player is in a vehicle"};     When a player enters a vehicle his entity becomes from 'player' to 'vehicle player'. The exclamation mark means 'the opposite', in this case NOT. So as an algorithm this translates to: If vehicle player IS NOT player then show a hint box that says Player is in a vehicle. Because when the players enters a vehicle the 'player' variable became 'vehicle player' this line there is not going to be FALSE. so _isInVehicle will be TRUE when he enters a vehicle.
In our code we check if (!dayz_inside and !_isInVehicle) then {   which means if the player is NOT inside a building (dayz_inside is another global conditional variable that checks if a player is inside a building or not) and is NOT inside a vehicle then do the following code....

Thats why i used the _isInVehicle variable at the same place where dayz_inside is...We wanna condition the script executing when the player is inside a vehicle or/and inside a building.
I think the solution is a simple....it could be a simple AND or OR confusion of mine, since i was out of the game for a while...Probably something like this: "if (!dayz_inside or !_isInVehicle) then {"  but i cant test things since i dont have the game/server installed anymore :/

 

Link to comment
Share on other sites

@Sandbird Thanks for the reply and all of your help.

 

That was a great response, I really like learning about the code.

 

I actually tried this a couple nights ago, and it didn't work either.

 

 if (dayz_inside || _isInVehicle) exitWith {
							cutText [format["Good, your zombie camo is safe now."], "PLAIN DOWN"];
							r_doLoop = false;
			      };

So i don't know where to go from here. I actually have a test server if you ever do wanna use it for anything. Also, there is a pretty simple way to set one up on your own PC. I can send you some already put together files if you ever want those as well.

Link to comment
Share on other sites

28 minutes ago, chi said:

@Sandbird


 if (dayz_inside || _isInVehicle) exitWith {
							cutText [format["Good, your zombie camo is safe now."], "PLAIN DOWN"];
							r_doLoop = false;
			      };

So i don't know where to go from here. I actually have a test server if you ever do wanna use it for anything. Also, there is a pretty simple way to set one up on your own PC. I can send you some already put together files if you ever want those as well.

I think everywhere i used the _isInVehicle variable has to be an 'or'  infront instead of an 'and' now that i think of it. Try changing all those and's to or's and give it a try. Only the ones in front of the _isInVehicle.

Unfortunately i dont have Arma2 installed at all anymore. Its not only the server part.

I wrote this ' Dayz.Epoch.3d.Editor.Live.Mission with Database Interaction ' thingy that you see in my signature...Its the fastest way to write/test/ scripts before you adding them to the server. I was using that to write my scripts, and if you manage to make it work for the latest epoch version it will save you hours.
Hopefully someone can pick this project up in the future where i left it and fix this damn vehicle bug....I am really 'rusty' nowdays with arma coding....although i am 99% sure if you change those 'and' to 'or's it will be fixed :P

Link to comment
Share on other sites

@chi and @Sandbird youre the desingner of this mod,, know more than me about it you try define _inVehicle variable as in fn_selfactions.sqf?

_vehicle = vehicle player;
_inVehicle = (_vehicle != player);

(remember add this two variables in private section at top of function)

so once you define it... to say player is driver use:

if (_inVehicle && (driver _vehicle == player)) then {

};

or

if (_inVehicle && (driver _vehicle == player)) exitWhit {

};

*And if u need define some kinds of vehicle who clean the camo example open vehicles as bikes... then

_iswashvehicle = typeOf _vehicle in ["put bike id","put motorcyle id","put atv id"];

if (_inVehicle && _iswashvehicle && (driver _vehicle == player)) then {

 

so you can try it:

Spoiler

if (!dayz_inside && !(_inVehicle && (driver _vehicle == player))) then {
                            _countdown = (_countdown - 1);
                            // Inform the player how long it will take till camo wears off
                            if ((time - _startRefillTime) <= _RefillTime) then {
                                     cutText [format["Its raining. Your zombie camo is getting washed away in %1 seconds.\nQuickly! Get inside a building.",str(_countdown)], "PLAIN DOWN"];
                            } else {    
                                    cutText [format["Your zombie camo got washed away by the rain."], "PLAIN DOWN"];
                                    sand_washed = true;
                                    hasGutsOnHim = false;  
                                    r_doLoop = false;
                            };
                            _RainAmt = drn_var_DynamicWeather_Rain; // Check for rain stopping
                            
                            if (_RainAmt < 0.025) exitWith {
                                cutText [format["The rain has stopped. Your zombie camo didnt wash off."], "PLAIN DOWN"];
                                r_doLoop = false;
                            };
                        }else{
                  
                            cutText [format["Good, your zombie camo is safe now."], "PLAIN DOWN"];
                            r_doLoop = false;
                  };

or it:

Spoiler

if (!dayz_inside && !(_inVehicle && (driver _vehicle == player))) then {
                            _countdown = (_countdown - 1);
                            // Inform the player how long it will take till camo wears off
                            if ((time - _startRefillTime) <= _RefillTime) then {
                                     cutText [format["Its raining. Your zombie camo is getting washed away in %1 seconds.\nQuickly! Get inside a building.",str(_countdown)], "PLAIN DOWN"];
                            } else {    
                                    cutText [format["Your zombie camo got washed away by the rain."], "PLAIN DOWN"];
                                    sand_washed = true;
                                    hasGutsOnHim = false;  
                                    r_doLoop = false;
                            };
                            _RainAmt = drn_var_DynamicWeather_Rain; // Check for rain stopping
                            
                            if (_RainAmt < 0.025) exitWith {
                                cutText [format["The rain has stopped. Your zombie camo didnt wash off."], "PLAIN DOWN"];
                                r_doLoop = false;
                            };
                        
                  if (dayz_inside or (_inVehicle && (driver _vehicle == player))) exitWith {
                            cutText [format["Good, your zombie camo is safe now."], "PLAIN DOWN"];
                            r_doLoop = false;
                  };

 

Link to comment
Share on other sites

5 hours ago, juandayz said:

@chi and @Sandbird youre the desingner of this mod,, know more than me about it you try define _inVehicle variable as in fn_selfactions.sqf?

_vehicle = vehicle player;
_inVehicle = (_vehicle != player);

(remember add this two variables in private section at top of function)

so once you define it... to say player is driver use:

if (_inVehicle && (driver _vehicle == player)) then {

};

or

if (_inVehicle && (driver _vehicle == player)) exitWhit {

};

*And if u need define some kinds of vehicle who clean the camo example open vehicles as bikes... then

_iswashvehicle = typeOf _vehicle in ["put bike id","put motorcyle id","put atv id"];

if (_inVehicle && _iswashvehicle && (driver _vehicle == player)) then {

 

so you can try it:

  Hide contents

if (!dayz_inside && !(_inVehicle && (driver _vehicle == player))) then {
                            _countdown = (_countdown - 1);
                            // Inform the player how long it will take till camo wears off
                            if ((time - _startRefillTime) <= _RefillTime) then {
                                     cutText [format["Its raining. Your zombie camo is getting washed away in %1 seconds.\nQuickly! Get inside a building.",str(_countdown)], "PLAIN DOWN"];
                            } else {    
                                    cutText [format["Your zombie camo got washed away by the rain."], "PLAIN DOWN"];
                                    sand_washed = true;
                                    hasGutsOnHim = false;  
                                    r_doLoop = false;
                            };
                            _RainAmt = drn_var_DynamicWeather_Rain; // Check for rain stopping
                            
                            if (_RainAmt < 0.025) exitWith {
                                cutText [format["The rain has stopped. Your zombie camo didnt wash off."], "PLAIN DOWN"];
                                r_doLoop = false;
                            };
                        }else{
                  
                            cutText [format["Good, your zombie camo is safe now."], "PLAIN DOWN"];
                            r_doLoop = false;
                  };

or it:

  Hide contents

if (!dayz_inside && !(_inVehicle && (driver _vehicle == player))) then {
                            _countdown = (_countdown - 1);
                            // Inform the player how long it will take till camo wears off
                            if ((time - _startRefillTime) <= _RefillTime) then {
                                     cutText [format["Its raining. Your zombie camo is getting washed away in %1 seconds.\nQuickly! Get inside a building.",str(_countdown)], "PLAIN DOWN"];
                            } else {    
                                    cutText [format["Your zombie camo got washed away by the rain."], "PLAIN DOWN"];
                                    sand_washed = true;
                                    hasGutsOnHim = false;  
                                    r_doLoop = false;
                            };
                            _RainAmt = drn_var_DynamicWeather_Rain; // Check for rain stopping
                            
                            if (_RainAmt < 0.025) exitWith {
                                cutText [format["The rain has stopped. Your zombie camo didnt wash off."], "PLAIN DOWN"];
                                r_doLoop = false;
                            };
                        
                  if (dayz_inside or (_inVehicle && (driver _vehicle == player))) exitWith {
                            cutText [format["Good, your zombie camo is safe now."], "PLAIN DOWN"];
                            r_doLoop = false;
                  };

 

I just tried them all and couldn't get it to work still. Not sure if I missed something or not, but I dont think i did.

Link to comment
Share on other sites

   you already define the variables? 

         private ["_vehicle","_isRain","_RefillTime","_countdown", 

 

_onLadder     = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
                _canDo        = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
                _playerPos     = getPosATL player;
                _isWater        = dayz_isSwimming;  //(surfaceIsWater _playerPos) or
                _vehicle = vehicle player;
                _inVehicle = (_vehicle != player);

                _canClean        = count nearestObjects [_playerPos, DZ_waterSources, 4] > 0;

Link to comment
Share on other sites

1 hour ago, juandayz said:

   you already define the variables? 

         private ["_vehicle","_isRain","_RefillTime","_countdown", 

 

_onLadder     = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
                _canDo        = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
                _playerPos     = getPosATL player;
                _isWater        = dayz_isSwimming;  //(surfaceIsWater _playerPos) or
                _vehicle = vehicle player;
                _inVehicle = (_vehicle != player);

                _canClean        = count nearestObjects [_playerPos, DZ_waterSources, 4] > 0;

Spoiler

//if (isServer) exitWith {};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// walkamongstthedead.sqf by Sandbird (Apr 20 2014)
// Camouflage your player with zombie guts to avoid detection, for DayZ Epoch 1.0.4.2 (should work for other dayz games)
// Forum Thread: http://goo.gl/a91sHw
//
// Credits: Enhanced Water Bottle Filling - by BDC - Aug 11 2013, for DayZ 1.7.7.1
//
// This script allows the player to cover himself with zombie parts to avoid detection by zombies.
// While the 'mod' is active hummanity level will drop continuously, until the player washes himself
// with a water bottle, or swim, or stand next to a well/pond. 
// Rain can wash away your camo as well. If it starts to rain, depending on the intensity of the rain
// you'll see a timer on how long it will take for the rain to wash away your camo. Get inside a building
// if you want to keep it.
//
//  :: Configurable Variables ::
//   _type : array that holds the idle sounds the player will make (female sounds have to be copied in the mission file, and add the sound in the description.ext)
//   _chance : chance in making random zombie sounds (default: 10, 1 out of 10 chance to make a sound. Notification message will be shown only once to the player.)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

[] spawn {
    private ["_txt","_EH_Fired"];
    waitUntil {(!isNil "sand_USEDGUTS")};
    if (isNil "sand_washed") then {sand_washed = false;};
    if (isNil "s_player_cleanguts") then {s_player_cleanguts = -1;};

    while {true} do {
        waitUntil {sleep 0.5;(hasGutsOnHim)};
        DZ_ZCAMO_STARTTIME = time;
        sand_SkinType = typeOf player;
        [] spawn sand_shieldON;
        //[] spawn sand_makeSounds;
        [] spawn sand_zIcon;
        [] spawn sand_cleanCheck;
        if !(DZ_IGNORESHOTSFIRED) then {
            _EH_Fired = player addEventHandler ["Fired", {
                cutText [format["You fired your weapon. Zombies are aware of you now."], "PLAIN DOWN"];
                _txt = "Get out of combat for the effect to return.";
                systemChat (""+str _txt+"");
                hasGutsOnHim = false;
            }];
        };
        waitUntil {sleep 0.5;((!hasGutsOnHim)||(typeOf player != sand_SkinType))};
        // Lose camo if player changes clothes
        if (typeOf player != sand_SkinType) then {
            [] spawn {
                _txt = "Skin change detected! You just lost your camo...";
                systemChat (""+str _txt+"");
                sleep 0.1;
                call sand_endScript;
                //waitUntil {!sand_washed};
                //hasGutsOnHim = true;
            };
        };
        [] spawn sand_shieldOFF;
        if !(DZ_IGNORESHOTSFIRED) then {
            player removeEventHandler ["Fired", _EH_Fired];
        };
    };
};

sand_shieldON = {
    private ["_txt"];
    _txt = "Zombies think you are one of them.";
    systemChat (""+str _txt+"");
    //cutText [_txt,"PLAIN DOWN"];
    player_zombieCheck = {};
    player_zombieAttack = {};
    DZE_hasZombieCamo = true;
};

sand_shieldOFF = {
    private ["_txt"];
    _txt = "Zombies are aware of you now.";
    systemChat (""+str _txt+"");
    //cutText [_txt,"PLAIN DOWN"];
    player_zombieCheck = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_zombieCheck.sqf';
    player_zombieAttack = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_zombieAttack.sqf';
    DZE_hasZombieCamo = false;
};

sand_makeSounds = {
    private ["_type","_chance","_sound","_isWoman","_plsound","_bloodleft","_id"];
    _isWoman = getText(configFile >> "cfgVehicles" >> (typeOf player) >> "TextPlural") == "Women";    
    while {true} do {
        if (!hasGutsOnHim) exitWith {};
        if (_isWoman) then {
            _type = ["wzombie1","wzombie2"];
        } else {
            _type = ["idle_0","idle_18","idle_20","idle_24","idle_26","idle_29","idle_32","idle_35","attack_9"];
        };
        _plsound  = _type call BIS_fnc_selectRandom;
        _chance = ceil (random 10);
        if ((round(random _chance) == _chance) or (_chance == 0)) then {
            _sound = "z_" + _plsound;
            [nil,player,rSAY,[_sound, 10]] call RE;
            if (isNil "showNotificationOnce") then {systemChat ("You will be making random zombie sounds."); showNotificationOnce = false;};
            sleep 1;
        };
        if (!DZ_ZCAMO_DEFAULT) then {
            if (!DZ_ZCAMO_HUMANITY) then {
                _bloodleft = r_player_blood - DZ_ZCAMO_BLOOD_AMOUNT;
                if (_bloodleft < 0) then {
                    _id = [] spawn player_death;
                } else {
                    r_player_blood = _bloodleft;
                };
                sleep DZ_ZCAMO_SLEEP_BLOOD;    
            } else {
                [player,DZ_ZCAMO_LOSE_HUMANITY, DZ_ZCAMO_SLEEP_HUMANITY] call player_humanityChange;
            };
        };
        if (DZ_ZCAMO_DEFAULT) then {
            sleep 1;
        };
    };
};

sand_zIcon = {
    private ["_control","_combatVal","_displayZ"];
    disableSerialization;
    
     5 cutRsc ["zCamoStatusGUI","PLAIN"];
    _displayZ = uiNamespace getVariable 'zCamo_GUI_display';
    _control =     _displayZ displayCtrl 1;
    _control ctrlShow true;
    while {true} do {
        _combatVal =    1 - dayz_combat;
        if (_combatVal == 0) then {
            if !(DZ_IGNORESHOTSFIRED) then {
                _control call player_guiControlFlash;
            };
        };
        sleep 0.5;
        if(sand_washed) exitWith {
            _control ctrlShow false;
        };
    };
};

sand_cleanCheck = {
private ["_isRain","_RefillTime","_countdown","_RainAmt","_startRefillTime","_onLadder","_canDo","_playerPos","_isWater","_canClean","_isPond","_isWell","_pondPos","_objectsWell","_objectsPond","_pondNear","_wellNear","_inVehicle","_vehicle"];
    while {true} do {
        if(hasGutsOnHim and (!sand_washed)) then {
                 scopeName "rainloop";
                _onLadder     = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
                _canDo        = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
                _playerPos     = getPosATL player;
                _isWater        = dayz_isSwimming;  //(surfaceIsWater _playerPos) or 
                _vehicle = vehicle player;
                _inVehicle = (_vehicle != player);
                _canClean        = count nearestObjects [_playerPos, DZ_waterSources, 4] > 0;
          _isPond = false;
          _isWell = false;
          _pondNear = false;
          _wellNear = false;
          _pondPos = [];
          _objectsWell = [];
                _isRain = false;
                if ((!hasGutsOnHim) and sand_washed) then {breakOut "rainloop";};
                if (_isWater) exitwith { cutText [format["You have successfully washed away the zombie parts from your body."], "PLAIN DOWN"]; call sand_endScript;};
                if ((time - DZ_ZCAMO_STARTTIME) > DZ_ZCAMO_USE_TIME and (DZ_ZCAMO_USE_TIME > 0)) exitwith { cutText [format["The zombie camo has faded away."], "PLAIN DOWN"]; call sand_endScript; breakOut "rainloop";};
    
                // Gather global weather (rain) variable; ranges from 0 to 1 (none to very, very hard rain)
                _RainAmt = drn_var_DynamicWeather_Rain; // referenced from \z\addons\dayz_code\system\DynamicWeatherEffects.sqf
                
                // If global rain amount is higher than 0, then set flag isRain to true
                if (_RainAmt > 0) then { _isRain = true; };
                
                _objectsPond = nearestObjects [_playerPos, [], 20];
                {
                //Check for pond
                _isPond = ["pond",str(_x),false] call fnc_inString;
                if (_isPond) then {
                    _pondPos = (_x worldToModel _playerPos) select 2;
                    if (_pondPos < 0) then {
                        _pondNear = true;
                    };
                };
                } forEach _objectsPond;
                
                _objectsWell = nearestObjects [_playerPos, [], 4];
                {
                //Check for Well
                _isWell = ["_well",str(_x),false] call fnc_inString;
                if (_isWell) then {_wellNear = true};
                } forEach _objectsWell;
                
                
                if(!isNull player) then {
                  if((speed player <= 1) && (_canClean || _pondNear || _wellNear) && _canDo) then {
                      if (s_player_cleanguts < 0) then {
                          s_player_cleanguts = player addaction["<t color=""#ff4444"">" + "Clean Guts" + "</t>","custom\smearzombieguts\usewatersupply.sqf","",5,false,true,"",""];
                      };
                  } else {
                      player removeAction s_player_cleanguts;
                      s_player_cleanguts = -1;
                  };
                };
                
                // It's raining! Remove the zombie parts
                if (!dayz_inside and _isRain and hasGutsOnHim and !_inVehicle) then {
                  
                  // Set initial loop variables
                  _startRefillTime = time;
                  r_interrupt = false;
                  r_doLoop = true;
                   
                  // Set refill time depending upon degree of rain (heavy, medium, or light)
                  _RefillTime = DZ_ZCAMO_LightRainLoseCamo; // set as default
                  if (_RainAmt > 0.53) then { // heavy rain
                    _RefillTime = DZ_ZCAMO_HeavyRainLoseCamo; };
                  if (_RainAmt > 0.25) then { // medium rain
                    _RefillTime = DZ_ZCAMO_MediumRainLoseCamo; }; 
                  if (_RainAmt < 0.25) then { // light rain
                    _RefillTime = DZ_ZCAMO_LightRainLoseCamo; }; 
                  
                  _countdown = _RefillTime;
                  // Loop thru required time to fill and check for interruptions
                    while {r_doLoop} do { 
                        if (!dayz_inside && !(_inVehicle && (driver _vehicle == player))) then {
                            _countdown = (_countdown - 1);
                            // Inform the player how long it will take till camo wears off
                            if ((time - _startRefillTime) <= _RefillTime) then {
                                     cutText [format["Its raining. Your zombie camo is getting washed away in %1 seconds.\nQuickly! Get inside a building.",str(_countdown)], "PLAIN DOWN"];
                            } else {    
                                    cutText [format["Your zombie camo got washed away by the rain."], "PLAIN DOWN"];
                                    sand_washed = true;
                                    hasGutsOnHim = false;  
                                    r_doLoop = false;
                            };
                            _RainAmt = drn_var_DynamicWeather_Rain; // Check for rain stopping
                            
                            if (_RainAmt < 0.025) exitWith {
                                cutText [format["The rain has stopped. Your zombie camo didnt wash off."], "PLAIN DOWN"];
                                r_doLoop = false;
                            };
                        };
                        
                         if (dayz_inside or (_inVehicle && (driver _vehicle == player))) exitWith {
                //if (dayz_inside or (_inVehicle && (driver _vehicle == player))) exitWith {
                            cutText [format["Good, your zombie camo is safe now."], "PLAIN DOWN"];
                            r_doLoop = false;
                        };
                  sleep 1;          
                    }; // end (timed) while loop
                };
        }else{
            if (dayz_combat != 1) then {hasGutsOnHim = true;  player removeAction s_player_cleanguts; s_player_cleanguts = -1;};
            if (sand_washed) then {call sand_endScript;};        
        };
        sleep 1;
    };
};

sand_endScript = {
    hasGutsOnHim = false; 
    sand_washed     = true;    
    sand_USEDGUTS = nil;
    player removeAction s_player_cleanguts;
    s_player_cleanguts = -1;    
};


player_guiControlFlash =     {
    private["_control"];
    _control = _this;
    if (ctrlShown _control) then {
        _control ctrlShow false;
    } else {
        _control ctrlShow true;
    };
};

This is what i tried. Thanks for your help by the way.

Link to comment
Share on other sites

I already defined _isInVehicle inside function 'sand_cleancheck'. There are private declarations there.

And i am initializing it bellow. No need to add it in the fn_selfactions.
fn_self_actions, is mostly for 'mouseover' actions.

I am 99% sure if i ran this in the 3d live editor i would be able to solve it in 5 min...but without the game installed anymore i cant test it :/
But you guys are really close. Dont forget @chi this trick has to be done wherever there is a dayz_inside check...Those 2 go together. All the checks are done properly for when 'the player is inside a building' so the calls for 'when he is inside a car' should also go there.

 

Link to comment
Share on other sites

10 hours ago, Sandbird said:

I already defined _isInVehicle inside function 'sand_cleancheck'. There are private declarations there.

And i am initializing it bellow. No need to add it in the fn_selfactions.
fn_self_actions, is mostly for 'mouseover' actions.

I am 99% sure if i ran this in the 3d live editor i would be able to solve it in 5 min...but without the game installed anymore i cant test it :/
But you guys are really close. Dont forget @chi this trick has to be done wherever there is a dayz_inside check...Those 2 go together. All the checks are done properly for when 'the player is inside a building' so the calls for 'when he is inside a car' should also go there.

 

yep i think you put in right place the change , about fn_selfaction,sqf yep i just say use the define of selfaction for _vehicle and _isInvehicle.  anyway its the same

your way

_isInVehicle = vehicle player != player;

fn_selfaction way

_vehicle = vehicle player;

_inVehicle = (_vehicle != player);

but using the selfaction way let you use this syntax to try any diferent

if (_inVehicle && (driver _vehicle == player)) then {

Any way @Sandbirdi have a doubt,, dayz_inside is own of epoch or you define it in some where? cuz maybe if is defined @chi can add vehicles as dayz_inside to try

 

 

Link to comment
Share on other sites

@juandayz its a dayz global variable. I didnt invent it :)

The secret to making this vehicle thing work is here: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/fn_temperatur.sqf

Its already using _isinvehicle type variable and doing the necessary checks...But like i said i cant test what's what, to come up with the actual finished code :/

Link to comment
Share on other sites

1 hour ago, juandayz said:

@chi  you already try a double check?

if  (!dayz_inside) then {
if  !(_inVehicle && (driver _vehicle == player)) then {

......

.....

};

};

Spoiler

sand_cleanCheck = {
private ["_isRain","_RefillTime","_countdown","_RainAmt","_startRefillTime","_onLadder","_canDo","_playerPos","_isWater","_canClean","_isPond","_isWell","_pondPos","_objectsWell","_objectsPond","_pondNear","_wellNear","_inVehicle","_vehicle"];
    while {true} do {
        if(hasGutsOnHim and (!sand_washed)) then {
                 scopeName "rainloop";
                _onLadder     = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
                _canDo        = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
                _playerPos     = getPosATL player;
                _isWater        = dayz_isSwimming;  //(surfaceIsWater _playerPos) or 
                _vehicle = vehicle player;
                _inVehicle = (_vehicle != player);
                _canClean        = count nearestObjects [_playerPos, DZ_waterSources, 4] > 0;
          _isPond = false;
          _isWell = false;
          _pondNear = false;
          _wellNear = false;
          _pondPos = [];
          _objectsWell = [];
                _isRain = false;
                if ((!hasGutsOnHim) and sand_washed) then {breakOut "rainloop";};
                if (_isWater) exitwith { cutText [format["You have successfully washed away the zombie parts from your body."], "PLAIN DOWN"]; call sand_endScript;};
                if ((time - DZ_ZCAMO_STARTTIME) > DZ_ZCAMO_USE_TIME and (DZ_ZCAMO_USE_TIME > 0)) exitwith { cutText [format["The zombie camo has faded away."], "PLAIN DOWN"]; call sand_endScript; breakOut "rainloop";};
    
                // Gather global weather (rain) variable; ranges from 0 to 1 (none to very, very hard rain)
                _RainAmt = drn_var_DynamicWeather_Rain; // referenced from \z\addons\dayz_code\system\DynamicWeatherEffects.sqf
                
                // If global rain amount is higher than 0, then set flag isRain to true
                if (_RainAmt > 0) then { _isRain = true; };
                
                _objectsPond = nearestObjects [_playerPos, [], 20];
                {
                //Check for pond
                _isPond = ["pond",str(_x),false] call fnc_inString;
                if (_isPond) then {
                    _pondPos = (_x worldToModel _playerPos) select 2;
                    if (_pondPos < 0) then {
                        _pondNear = true;
                    };
                };
                } forEach _objectsPond;
                
                _objectsWell = nearestObjects [_playerPos, [], 4];
                {
                //Check for Well
                _isWell = ["_well",str(_x),false] call fnc_inString;
                if (_isWell) then {_wellNear = true};
                } forEach _objectsWell;
                
                
                if(!isNull player) then {
                  if((speed player <= 1) && (_canClean || _pondNear || _wellNear) && _canDo) then {
                      if (s_player_cleanguts < 0) then {
                          s_player_cleanguts = player addaction["<t color=""#ff4444"">" + "Clean Guts" + "</t>","custom\smearzombieguts\usewatersupply.sqf","",5,false,true,"",""];
                      };
                  } else {
                      player removeAction s_player_cleanguts;
                      s_player_cleanguts = -1;
                  };
                };
                
                // It's raining! Remove the zombie parts
                if (!dayz_inside and _isRain and hasGutsOnHim and !_inVehicle) then {
                  
                  // Set initial loop variables
                  _startRefillTime = time;
                  r_interrupt = false;
                  r_doLoop = true;
                   
                  // Set refill time depending upon degree of rain (heavy, medium, or light)
                  _RefillTime = DZ_ZCAMO_LightRainLoseCamo; // set as default
                  if (_RainAmt > 0.53) then { // heavy rain
                    _RefillTime = DZ_ZCAMO_HeavyRainLoseCamo; };
                  if (_RainAmt > 0.25) then { // medium rain
                    _RefillTime = DZ_ZCAMO_MediumRainLoseCamo; }; 
                  if (_RainAmt < 0.25) then { // light rain
                    _RefillTime = DZ_ZCAMO_LightRainLoseCamo; }; 
                  
                  _countdown = _RefillTime;
                  // Loop thru required time to fill and check for interruptions
                    while {r_doLoop} do { 
                        if (!dayz_inside && !(_inVehicle && (driver _vehicle == player))) then {
                            _countdown = (_countdown - 1);
                            // Inform the player how long it will take till camo wears off
                            if ((time - _startRefillTime) <= _RefillTime) then {
                                     cutText [format["Its raining. Your zombie camo is getting washed away in %1 seconds.\nQuickly! Get inside a building.",str(_countdown)], "PLAIN DOWN"];
                            } else {    
                                    cutText [format["Your zombie camo got washed away by the rain."], "PLAIN DOWN"];
                                    sand_washed = true;
                                    hasGutsOnHim = false;  
                                    r_doLoop = false;
                            };
                            _RainAmt = drn_var_DynamicWeather_Rain; // Check for rain stopping
                            
                            if (_RainAmt < 0.025) exitWith {
                                cutText [format["The rain has stopped. Your zombie camo didnt wash off."], "PLAIN DOWN"];
                                r_doLoop = false;
                            };
                        };
                        
                              if  (!dayz_inside) then {
                              if  !(_inVehicle && (driver _vehicle == player)) then {

                            cutText [format["Good, your zombie camo is safe now."], "PLAIN DOWN"];
                            r_doLoop = false;
                        };

                        };
                  sleep 1;          
                    }; // end (timed) while loop
                };
        }else{
            if (dayz_combat != 1) then {hasGutsOnHim = true;  player removeAction s_player_cleanguts; s_player_cleanguts = -1;};
            if (sand_washed) then {call sand_endScript;};        
        };
        sleep 1;
    };
};

Are you saying to add it like this in blue and try @juandayz?

Link to comment
Share on other sites

yes, but u need add one more };

if (!dayz_inside) then {
						if !(_inVehicle && (driver _vehicle == player)) then {
							_countdown = (_countdown - 1);
							// Inform the player how long it will take till camo wears off
							if ((time - _startRefillTime) <= _RefillTime) then {
									 cutText [format["Its raining. Your zombie camo is getting washed away in %1 seconds.\nQuickly! Get inside a building.",str(_countdown)], "PLAIN DOWN"];
							} else {    
									cutText [format["Your zombie camo got washed away by the rain."], "PLAIN DOWN"];
									sand_washed = true;
									hasGutsOnHim = false;  
									r_doLoop = false;
							};
							_RainAmt = drn_var_DynamicWeather_Rain; // Check for rain stopping
							
							if (_RainAmt < 0.025) exitWith {
								cutText [format["The rain has stopped. Your zombie camo didnt wash off."], "PLAIN DOWN"];
								r_doLoop = false;
							};
							};
						};

remember define _vehicle

Link to comment
Share on other sites

  • 4 months later...

Has anyone tried to get this to work with 1.0.6? Ive got it installed and mostly working, but theres a ton of errors in rpt. Imma try to sort them out but ill post here to get them discussed and have guys who know what they are doing help sort through the fog.

I modified none of the files and follows the install as per the op except for the part with RscTitles. It throws the error as already defined in dayz_code/ui/........ and i wasnt to sure how to handle it so I just added the contained class in rsctitles to my description and it worked, with error tho. Zeds dont attack, guts have right click, guts get consumed, chat displays theyve been applied. I havent tested in rain, in vehicle or checked the humanity drain. also the gui icon doesnt display. 

Spoiler

Error in expression <"
private ["_txt","_smQTY","_c"];


if (dayz_combat == 1) exitWith {
_txt = "You>
  Error position: <dayz_combat == 1) exitWith {
_txt = "You>
  Error Undefined variable in expression: dayz_combat
File mpmissions\__CUR_MP.Chernarus\custom\walkamongstthedead\smear_guts.sqf, line 4
String STR_EVAL_TYPENAN not found
Error in expression <ty = (player getVariable["humanity",0]) + _change;
player setVariable["humanity">
  Error position: <+ _change;
player setVariable["humanity">
  Error +: Type Object, expected Number,Array,String
File z\addons\dayz_code\compile\player_humanityChange.sqf, line 5
Warning Message: Resource title zCamoStatusGUI not found
Error in expression <rue;
while {true} do {
_combatVal =    1 - dayz_combat;
if (_combatVal == 0) then {>
  Error position: <dayz_combat;
if (_combatVal == 0) then {>
  Error Undefined variable in expression: dayz_combat
File mpmissions\__CUR_MP.Chernarus\custom\walkamongstthedead\walkamongstthedead.sqf, line 128
Error in expression <riable 'zCamo_GUI_display';
_control =     _displayZ displayCtrl 1;
_control ctrlSh>
  Error position: <_displayZ displayCtrl 1;
_control ctrlSh>
  Error Undefined variable in expression: _displayz
File mpmissions\__CUR_MP.Chernarus\custom\walkamongstthedead\walkamongstthedead.sqf, line 125
Error in expression <rue;
while {true} do {
_combatVal =    1 - dayz_combat;
if (_combatVal == 0) then {>
  Error position: <dayz_combat;
if (_combatVal == 0) then {>
  Error Undefined variable in expression: dayz_combat

 

Error in expression <};
sleep 1;          
}; 
};
}else{
if (dayz_combat != 1) then {hasGutsOnHim = t>
  Error position: <dayz_combat != 1) then {hasGutsOnHim = t>
  Error Undefined variable in expression: dayz_combat

 

Link to comment
Share on other sites

Hi Viktor

Although i am not playing dayz anymore, i can spot some things still in the log to help out :)


Error Undefined variable in expression: dayz_combat
I guess dayzepoch stopped using dayz_combat to see if the player is in combat mode. You have to find the new global variable that represents this status and MASS REPLACE in all of my script files.


Error in expression <ty = (player getVariable["humanity",0]) + _change;
hmmmm, i guess hummanity is also not set on the player anymore. Probably you should SET the hummanity on the player before you get in this line of code.


File z\addons\dayz_code\compile\player_humanityChange.sqf, line 5
As you can see from this error, its obvious that hummanity has changed somehow. A good start would be to open that .sqf file (it is in the addons map files) and see what changed.


Warning Message: Resource title zCamoStatusGUI not found
You probably messed up the copy/paste in the RscTitles place, and it cant find the zCamoStatusGUI variable


Error Undefined variable in expression: _displayz
Same thing....dayzepoch removed or changed _displayz varable when it comes to the GUI interface...you'll have to find the new variable

Hope that helps :)

Link to comment
Share on other sites

On 1/18/2017 at 8:02 PM, Sandbird said:

Hi Viktor

Although i am not playing dayz anymore, i can spot some things still in the log to help out :)


Error Undefined variable in expression: dayz_combat
I guess dayzepoch stopped using dayz_combat to see if the player is in combat mode. You have to find the new global variable that represents this status and MASS REPLACE in all of my script files.


Error in expression <ty = (player getVariable["humanity",0]) + _change;
hmmmm, i guess hummanity is also not set on the player anymore. Probably you should SET the hummanity on the player before you get in this line of code.


File z\addons\dayz_code\compile\player_humanityChange.sqf, line 5
As you can see from this error, its obvious that hummanity has changed somehow. A good start would be to open that .sqf file (it is in the addons map files) and see what changed.


Warning Message: Resource title zCamoStatusGUI not found
You probably messed up the copy/paste in the RscTitles place, and it cant find the zCamoStatusGUI variable


Error Undefined variable in expression: _displayz
Same thing....dayzepoch removed or changed _displayz varable when it comes to the GUI interface...you'll have to find the new variable

Hope that helps :)

Indeed, a lot of variables to rename and change but still throwing a RscTitles error. If i paste the code with it included within class RscTitles, then i get an already defined error, if i dont keep it within rsctitles and paste the zCamoStatusGui class in my description by itself, then it complains about rscTitles. I know rscTitles is included in dayz_code.pbo but i just dont know enough about coding to make it reference to that location. I cant very well just add it to rscTitles in dayz_code (wherever it is in there) because it would be incompatible with a stock epoch dl and i would be forced to upload a fix for that and...... ow headach.

Link to comment
Share on other sites

  • 2 months later...

probably not...Unless you know which global variables are needed to replace the old ones. (ex: dayz_combat).
I guess if you know how to code, and you are familiar with 10.6.1 changes...you could easily make this work in a few minutes.

Unfortunately i stopped playing dayz, so i got no idea what has changed since 10.4 (if i am not mistaken...i wrote this for epoch 1.0.4)

 

Link to comment
Share on other sites

On ‎2017‎年‎1‎月‎19‎日 at 10:02 AM, Sandbird said:

Hi Viktor

Although i am not playing dayz anymore, i can spot some things still in the log to help out :)


Error Undefined variable in expression: dayz_combat
I guess dayzepoch stopped using dayz_combat to see if the player is in combat mode. You have to find the new global variable that represents this status and MASS REPLACE in all of my script files.


Error in expression <ty = (player getVariable["humanity",0]) + _change;
hmmmm, i guess hummanity is also not set on the player anymore. Probably you should SET the hummanity on the player before you get in this line of code.


File z\addons\dayz_code\compile\player_humanityChange.sqf, line 5
As you can see from this error, its obvious that hummanity has changed somehow. A good start would be to open that .sqf file (it is in the addons map files) and see what changed.


Warning Message: Resource title zCamoStatusGUI not found
You probably messed up the copy/paste in the RscTitles place, and it cant find the zCamoStatusGUI variable


Error Undefined variable in expression: _displayz
Same thing....dayzepoch removed or changed _displayz varable when it comes to the GUI interface...you'll have to find the new variable

Hope that helps :)

1. dayz_combat
dayz_combat seems to be changed to
player getVariable ["inCombat",false];

2.&3. Error in expression <ty = (player getVariable["humanity",0]) + _change;
In player_humanityChange.sqf,  I found "_change = _this select 0;" and "_wait = _this select 1;", so
[player,DZ_ZCAMO_LOSE_HUMANITY, DZ_ZCAMO_SLEEP_HUMANITY] call player_humanityChange ;
may be
[DZ_ZCAMO_LOSE_HUMANITY, DZ_ZCAMO_SLEEP_HUMANITY] call player_humanityChange;

4.&5. Error Undefined variable in expression: _displayz

 _displayZ = uiNamespace getVariable 'zCamo_GUI_display';

so it may be the problem of 'zCamo_GUI_display',

(I haven't checked everything...)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...