Jump to content

Recommended Posts

I've been using this script for some time by JohnO that I stumbled across in some forums and I made it a point to make his script even better! This is a good script to use to make any survival scenario better! As In my case I use this script with my Ravage releases.

 

The Script:

Spoiler

// weatherEffects.sqf: v4.0
 

//Changelog: Check Forums For full list

 

// ** Weather effects by JohnO, edited by MuRaZorWitchKING **//
 
private ["_exitA","_exitB","_exitWeather","_fatigue","_rainLevel","_damage","_uniform","_cover","_fire","_distanceToCover","_distanceToFire","_showSick","_showCold","_effectsCheck","_warm","_sick","_healthyInd","_vehicle"];
 
/** SETTINGS **/
/** Notifications **/
 
_showSick = true; //True to enable notifications "Eg You are getting sick"
_showCold = true; //True to enable notifications "Eg You are getting cold"
_effectsCheck = 60; //Time in seconds that the weather effects will apply. This time is x2, so 60 is actually 120. Due to the way the script works.
_healthyInd = false; // If true - will display a "You are healthy" status when the character is not sick or cold.
 
_coldClothes =
[
"", //NAKED - DO NOT CHANGE
"U_BasicBody",
"U_AttisBody",
"U_AntigonaBody",
"Exile_Uniform_BambiOverall",
//Civilian
"",
//Soldier
"",
//Guarilla
"",
//Special
"U_B_survival_uniform",
"U_I_Wetsuit",
"U_O_Wetsuit",
"U_B_Wetsuit",
"Exile_Uniform_Woodland"
];    
 
sick = false;
_warm = true;
cold = 0;
_sickChance = 0;
sickValue = 0;
_fatigue = 0;
_rainLevel = rain;
_damage = damage player;
_uniform = uniform player;
_cover = nearestBuilding player;
_fire = nearestObject[player,"FirePlace_burning_F"];
_distanceToCover = player distance _cover;
_distanceToFire = player distance _fire;
_vehicle = vehicle player iskindOf "LandVehicle";

 

[sick,sickValue,cold] spawn
{
        _exitA = false;
        waituntil
        {
               
                if (!alive player) then
                {    
                        sick = false;
                        cold = 0;
                        sickValue = 0;
                        player enableStamina true;
                        player allowSprint true;
                };
                uiSleep 1;
                _exitA      
        };        
           
};
 
[] spawn
{
        _exitB = false;      
        waituntil
        {
                if (damage player > 0.75) then
                {      
                        enableCamShake true;
                        addCamShake [5, 3, 30];
                        uiSleep 5;
                };
                uiSleep 1;
                _exitB
        };      
};
 
_exitWeather = false;
waitUntil
{    
        if (alive player) then
        {        
                if (_healthyInd) then
                {      
                        if ((!sick) && (_warm) && (sickValue <= 0)) then
                        {
                                titleText ["<t color='#00ff00' size='1' align='left' valign='bottom'>You are Not Cold</t><br/>", "PLAIN DOWN", 0.5, true, true];

                        };
                };
         
                if (sickValue <= 0) then
                {
                        sickValue = 0;
                }
                else
                {
                        if (sickValue >= 1) then
                        {
                                sickValue = 1;
                        };
                };
                if (cold <= 0) then
                {                
                        cold = 0;
                }
                else
                {
                        if (cold >= 1) then
                        {
                                cold = 0.9;
                        };
                };
                                               
                uiSleep _effectsCheck;
         
                _rainLevel = rain;
                _damage = damage player;
                _uniform = uniform player;
                _cover = nearestBuilding player;
                _fire = nearestObject [player,"FirePlace_burning_F"];
                _distanceToCover = player distance _cover;
                _distanceToFire = player distance _fire;
                _vehicle = vehicle player iskindOf "LandVehicle";
                

                if ((daytime >= 18 || daytime < 7) || (_rainLevel > 0.2 )) then {_warm = false};
          
                if !((player == vehicle player)) then {_warm = true};
                if ((!_warm) && (_uniform in _coldClothes)) then {_warm = false};
                if ((!_warm) && (_distanceToFire < 5) || (_distanceToCover < 15)) then {_warm = true};
         if !(_uniform in _coldClothes) then {_warm = true};
               
                if (_warm) then
                {
                        _warm = true;
                        cold = cold - 0.1;
                        if (cold <= 0) then
                        {
                                if (sickValue >= 0) then
                                {
                                        sickValue = sickValue - 0.05;
                                        if (sickValue <= 0.25) then
                                        {
                                                sick = false;
                                                enableCamShake false;
                                                player enableStamina true;
                                                player allowSprint true;
                                                uiSleep 1;
                                                if ((_showSick) && (sickValue >= 0 && sickValue <= 0.25)) then
                                                {
                                                        titleText ["<t color='#587209' size='1' align='left' valign='bottom'>You are feeling better</t><br/>", "PLAIN DOWN", 0.5, true, true];
                                                };
                                        };
                                };    
                        };
                }
                else
                {
                        _warm = false;
                        cold = cold + 0.1;
                };
                if ((_showCold) && (cold >= 0 && cold <=0.1) && (!_warm)) then
                {
                        titleText ["<t color='#42aaf4' size='1' align='left' valign='bottom'> You are getting Cold</t><br/>", "PLAIN DOWN", 0.5, true, true];
                }
                else
                {
                        if ((_showCold) && (cold >= 0.2 && cold <= 0.3) && (!_warm)) then
                        {
                                titleText ["<t color='#193066' size='1' align='left' valign='bottom'>You are Freezing</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                        };
               };
         
                uiSleep _effectsCheck;
               
                if ((cold > 0.3) && (!_warm)) then
                {
                        cold = cold + 0.1;
                        player setDamage _damage +0.07;
                        enableCamShake true;
                        addCamShake [5, 3, 60];
                        if (_showCold) then
                        {
                                titleText ["<t color='#2b176d' size='1' align='left' valign='bottom'>You are Freezing to Death</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                        };
                };
               
                if ((!_warm) && (cold > 0.3 )) then
                {
                        _sickChance = random 1;
         
                        if ((_sickChance > 0.5) || (sickValue > 0)) then
                        {
                                sick = true;
                                sickValue = sickValue + 0.05;
                                if ((_showSick) && (sickValue < 0.25)) then
                                {
         
                                        titleText ["<t color='#b25905' size='1' align='left' valign='bottom'>You are Getting Sick</t><br/>", "PLAIN DOWN", 0.5, true, true];
         
                                };
                                if ((sickValue > 0.25) && (sickValue < 0.50)) then
                                {
                                        player enableStamina true;
                                        player allowSprint false;
                                        enableCamShake true;
                                        addCamShake [5, 3, 30];
                                       
         
                                        if (_showSick) then
                                        {
                                                titleText ["<t color='#c9701e' size='1' align='left' valign='bottom'>You are Very Sick</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
      
                                        };
                                }
                                else
                                {
                                        if (sickValue > 0.50) then
                                        {
                                                player enableStamina true;
                                                player allowSprint false;
                                                enableCamShake true;
                                                addCamShake [10, 10, 15];
                                                [120] call BIS_fnc_bloodEffect;
                                                player setDamage _damage + 0.02;
                                               
         
                                                if (_showSick) then
                                                {
                                                        titleText ["<t color='#a80b0b' size='1' align='left' valign='bottom'>You are Dying</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                                                };
                                        };
                                };
                        };
                };            
                if ((_warm) && (sick)) then
                {      
                        if ((_showSick) && (sickValue < 0.25)) then
                        {
                                titleText ["<t color='#90a014' size='1' align='left' valign='bottom'>You are Sick</t><br/>", "PLAIN DOWN", 0.5, true, true];
                        };
                        if ((sickValue > 0.25) && (sickValue < 0.50)) then
                        {
                               
                                enableCamShake true;
                                addCamShake [5, 3, 30];
                               
         
                                if (_showSick) then
                                {
                                        titleText ["<t color='#c9701e' size='1' align='left' valign='bottom'>You are Very Sick</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                                };
                        }
                        else
                        {
                                if (sickValue > 0.50) then
                                {
                                        player enableStamina true;
                                        player allowSprint false;
                                        enableCamShake true;
                                        addCamShake [10, 10, 15];
                                        [120] call BIS_fnc_bloodEffect;
                                        player setDamage _damage + 0.02;
                                       
         
                                        if (_showSick) then
                                        {
                                                titleText ["<t color='#a80b0b' size='1' align='left' valign='bottom'>You are Dying</t><br/>", "PLAIN DOWN", 0.5, true, true];
                                        };
                                };
                        };
                };
        };
        uiSleep 1;
        _exitWeather  
};

 

Changelog/ edit notes: 

 

v1.5 JohnO- Removed legacy fatigue settings and put  new stamina settings in

 

v2.0 MuRaZorWitchKING - added colorization of effects to make them more "appealing"

 

v2.5 MuRaZorWitchKING - made script compatible with Ravage fireplaces that the player can place on ground

 

v3.0 MuRaZorWitchKING - tweaked distances required to be from fireplaces/buildings for warmth

 

v4.0 MuRaZorWitchKING - added in land vehicles being another form of covering for players to use for warmth so buildings and fires aren't relied upon

 

Readme: 

 

In Order to use the script you need to have an init.sqf file that needs this script loaded into it in order for it to be used.

 

In order for the script to work properly you ARE going to need the classnames of the list of clothing you are wanting to use for the player to get cold in. 

 

READ THIS: The classnames that you add into the script ARE THE COLD CLOTHING, everything listed will be a cold outfit, everything NOT listed will NOT be a cold outfit.

 

THESE CLASSNAMES NEED TO BE FILLED OUT BY YOU: 

 

////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

//Civilian

"",
//Soldier
"",
//Guarilla
"",

////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Once you figure out the classname of the outfit for example "U_C_Journalist" then you will place the name inside the "" and you will separate each item with a comma as seen in the example. 

 

If you want a FULL release of the script (filled out with all the classnames) I will be happy to help, this is more of a very simple layout, and should be taken as such, this script is for YOU to customize to your scenario/map wants and needs.

 

///////VERY IMPORTANT PLEASE READ: Please take note this is NOT my script, this is just someone else's work that I have revamped for a re-release. If the original author of the script no longer wants this up, this post WILL be removed. I hope you all enjoy this, JohnO did an amazing job on the script and is the original Author of it, I just thought it deserved a little more tweaking and a re-release. :)

 

PLEASE REMEMBER TO GIVE CREDITS TO ORIGINAL AUTHOR: JohnO

 

Link to Author's Original release: https://www.exilemod.com/topic/7717-detrimental-weather-effects-script/

 

//////////////////////////////////////////////////////////////////////////////////////////////////

Update for Frigid water Settings

 

The Script:

Spoiler

//MRZColdwaters.sqf: v1.0

//** MRZColdwaters by MuRaZorWitchKING **//

MRZ_effectsCheck = 2;    

[] spawn {
while {alive player} do {

    if((underwater player) or ((getPosASLW player select 2) < -1)) then {

    systemchat"";
    
    player setdamage damage player + 0.05;
    enableCamShake true;
    addCamShake [5, 3, 60];  

    titleText ["<t color='#42aaf4' size='1' align='left' valign='bottom'>Frigid Water</t><br/>", "PLAIN DOWN", 0.5, true, true];
    
    uiSleep MRZ_effectsCheck;
    } else {
    
    systemchat"";
    
    uiSleep MRZ_effectsCheck;
    };
    };
};

Simply add this script into your init.sqf in order to use it :)

 

//PLEASE READ: YOU ARE FREE TO EDIT THIS SCRIPT, CHANGE IT WHICH WAY YOU WANT, BUT I WOULD LIKE CREDITS PLEASE.

@GEORGE FLOROS GR Also helped me correct my errors after typing this script, couldn't of done it without this guy!

 

////NOTES: Both of these scripts are compatible with one another and work greatly paired together. 

 

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Hypothermia Script / Severe Weather based off of JohnO's weather effects script:

 

Spoiler

//MRZHypothermia.sqf: v1.0

//** MRZHypothermia by MuRaZorWitchKING based off of Detrimental Weather effects by JohnO **//

//** Got this idea from the Weather effects script, wanted a script that didn't use the "Cold Clothing" function, So I looked through the settings of Johno's script and made a script based purely off of the weather within a Scenario, and this is what came out of it, you may notice some features that appear the same, just know this script is built off his work, so similarities will exist. **//
 

                                                                                                                                                                                        
private ["_MRZexitHypothermia","_fire","_damage","_building","_distanceToBuilding","_rainLevel","_distanceToFire","_showhypo","_showwetness","MRZ_effectsCheck","_SuitableWeather","_hypothermia","_vehicle","_exitA","_exitB"];
 
_showhypo = true; //True to show hypothermia status.
_showwetness = true; //True to enable whether or not you are wet.
MRZ_effectsCheck = 60; //Time in seconds that the script fires.
hypothermia = false;
_SuitableWeather = true;
wetness = 0;
_sickChance = 0;
hypoValue = 0;
_rainLevel = rain;
_damage = damage player;
_building = nearestBuilding player;
_fire = nearestObject[player,"FirePlace_burning_F"];
_distanceToFire = player distance _fire;
_vehicle = vehicle player iskindOf "LandVehicle";
_distanceToBuilding = player distance _building;

[hypothermia,hypoValue,wetness] spawn
{
        _exitA = false;
        waituntil
        {
               
                if (!alive player) then
                {    
                        hypothermia = false;
                        wetness = 0;
                        hypoValue = 0;
                        player enableStamina true;
                        player allowSprint true;
                };
                uiSleep 1;
                _exitA      
        };        
           
};
 
[] spawn
{
        _exitB = false;      
        waituntil
        {
                if (damage player > 0.75) then
                {      
                        enableCamShake true;
                        addCamShake [5, 3, 30];
                        [120] call BIS_fnc_bloodEffect;                        
                        uiSleep 5;
                        titleText ["<t color='#a80b0b' size='1' align='left' valign='bottom'>You are Dying...</t><br/>", "PLAIN DOWN", 0.5, true, true];
                };
                uiSleep 1;
                _exitB
        };      
};
 
_MRZexitHypothermia = false;
waitUntil
{    
        if (alive player) then
        {        
                
         
                if (hypoValue <= 0) then
                {
                        hypoValue = 0;
                }
                else
                {
                        if (hypoValue >= 1) then
                        {
                                hypoValue = 1;
                        };
                };
                if (wetness <= 0) then
                {                
                        wetness = 0;
                }
                else
                {
                        if (wetness >= 1) then
                        {
                                wetness = 0.9;
                        };
                };
                                               
                uiSleep MRZ_effectsCheck;
         
                _rainLevel = rain;
                _damage = damage player;
                _fire = nearestObject [player,"FirePlace_burning_F"];
                _distanceToFire = player distance _fire;
                _vehicle = vehicle player iskindOf "LandVehicle";                
                _distanceToBuilding = player distance _building;
                _building = nearestBuilding player; 

                if ((_rainLevel > 0.5 )) then {_SuitableWeather = false};
          
                if !((player == vehicle player)) then {_SuitableWeather = true};
                
                if ((!_SuitableWeather) && (_distanceToFire < 5) || (_distanceToBuilding < 15)) then {_SuitableWeather = true};
                                        
                if (_SuitableWeather) then                                                                           
                {
                        _SuitableWeather = true;
                        wetness = wetness - 0.1;
                        if (wetness <= 0) then
                        {
                                if (hypoValue >= 0) then
                                {
                                        hypoValue = hypoValue - 0.05;
                                        if (hypoValue <= 0.25) then
                                        {
                                                hypothermia = false;
                                                enableCamShake false;
                                                player enableStamina true;
                                                player allowSprint true;
                                                uiSleep 1;
                                                if ((_showhypo) && (hypoValue >= 0 && hypoValue <= 0.25)) then
                                                {
                                                        titleText ["<t color='#ffffff' size='1' align='left' valign='bottom'>You are no longer wet</t><br/>", "PLAIN DOWN", 0.5, true, true];
                                                };
                                        };
                                };    
                        };
                }
                else
                {
                        _SuitableWeather = false;
                        wetness = wetness + 0.1;
                };
                if ((_showwetness) && (wetness >= 0 && wetness <=0.1) && (!_SuitableWeather)) then
                {
                        titleText ["<t color='#ffffff' size='1' align='left' valign='bottom'>You are Wet from the rain</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                }
                else
                {
                        if ((_showwetness) && (wetness >= 0.2 && wetness <= 0.3) && (!_SuitableWeather)) then
                        {
                                titleText ["<t color='#42aaf4' size='1' align='left' valign='bottom'>You are Soaked from the rain</t><br/>", "PLAIN DOWN", 0.5, true, true];  
                        };
                };
         
                uiSleep MRZ_effectsCheck;
               
                if ((wetness > 0.3) && (!_SuitableWeather)) then
                {
                        wetness = wetness + 0.1;
                        player setDamage _damage +0.07;
                        enableCamShake true;
                        addCamShake [5, 3, 60];
                        if (_showwetness) then
                        {
                                titleText ["<t color='#00BEFF' size='1' align='left' valign='bottom'>You are Freezing from your soaked clothing find shelter immediately</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                        };
                };
               
                if ((!_SuitableWeather) && (wetness > 0.3 )) then
                {
                        _sickChance = random 1;
         
                        if ((_sickChance > 0.2) || (hypoValue > 0)) then
                        {
                                hypothermia = true;
                                hypoValue = hypoValue + 0.05;
                                if ((_showhypo) && (hypoValue < 0.25)) then
                                {
         
                                        titleText ["<t color='#b25905' size='1' align='left' valign='bottom'>Hypothermia Risk +</t><br/>", "PLAIN DOWN", 0.5, true, true];
         
                                };
                                if ((hypoValue > 0.25) && (hypoValue < 0.50)) then
                                {
                                        player enableStamina true;
                                        player allowSprint false;
                                        enableCamShake true;
                                        addCamShake [5, 3, 30];
                                       
         
                                        if (_showhypo) then
                                        {
                                                titleText ["<t color='#c9701e' size='1' align='left' valign='bottom'>You have Hypothermia, seek fire and shelter</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
      
                                        };
                                }
                                else
                                {
                                        if (hypoValue > 0.50) then
                                        {
                                                player enableStamina true;
                                                player allowSprint false;
                                                enableCamShake true;
                                                addCamShake [10, 10, 15];
                                                [120] call BIS_fnc_bloodEffect;
                                                player setDamage _damage + 0.02;
                                               
         
                                                if (_showhypo) then
                                                {
                                                        titleText ["<t color='#a80b0b' size='1' align='left' valign='bottom'>You are Dying of Hypothermia...</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                                                };
                                        };
                                };
                        };
                };            
                if ((_SuitableWeather) && (hypothermia)) then
                {      
                        if ((_showhypo) && (hypoValue < 0.25)) then
                        {
                                titleText ["<t color='#90a014' size='1' align='left' valign='bottom'>Hypothermia risk -</t><br/>", "PLAIN DOWN", 0.5, true, true];
                        };
                        if ((hypoValue > 0.25) && (hypoValue < 0.50)) then
                        {
                               
                                enableCamShake true;
                                addCamShake [5, 3, 30];
                               
         
                                if (_showhypo) then
                                {
                                        titleText ["<t color='#c9701e' size='1' align='left' valign='bottom'>You have Hypothermia, seek fire and shelter</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                                };
                        }
                        else
                        {
                                if (hypoValue > 0.50) then
                                {
                                        player enableStamina true;
                                        player allowSprint false;
                                        enableCamShake true;
                                        addCamShake [10, 10, 15];
                                        [120] call BIS_fnc_bloodEffect;
                                        player setDamage _damage + 0.04;
                                       
         
                                        if (_showhypo) then
                                        {
                                                titleText ["<t color='#a80b0b' size='1' align='left' valign='bottom'>You are Dying of Hypothermia...</t><br/>", "PLAIN DOWN", 0.5, true, true];
                                        };
                                };
                        };
                };
        };
        uiSleep 1;
        _MRZexitHypothermia  
};

Simply put the script in your init.sqf for it to be initialized.

 

Please Read: This script is based off the Detrimental weather effects script by JohnO, so similarities will exist, as I used Detrimental Weather effects as a template for this script.

 

this script uses wetness as a buildable value that can build up to a deadly level and can leave you with Hypothermia... You will need shelter, fire, and of course you will need to stay out of rough weather...

 

This script is only active is severe weather storms, if the weather isn't above a factor of 0.6 then this script will not be called... This script is for a severe weather system only, unless edited.

 

All three scripts seem to work together, I cannot say this is for sure or certain, but in the playtime I have been using them I have seen them work... 

 

In order to get all three to work together you must edit out all the "_rainLevel" lines in the weather effects script... So both scripts aren't searching for "rain".

 

ALL FOUR SCRIPTS COMBINED MAKE FOR AN EXTREMELY REACTIVE WORLD THAT IS TOUGH TO SURVIVE IN. 

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

 

Simple "Cold Altitude" script:

 

Spoiler

//MRZColdRegion.sqf: v1.0

//** MRZColdRegion by MuRaZorWitchKING **//

MRZ_effectsCheck = 15;    

[] spawn {
while {alive player} do {

    if((getPosASL player select 2 )> 680 && vehicle player isEqualTo player) then {

    systemchat"";
    
    player setdamage damage player + 0.02;
    enableCamShake true;
    addCamShake [5, 3, 60];  

    cutText [selectrandom["This cold takes my breath away.","The winds are too strong up here.","It's very cold.","I need to get to lower ground.","it is too cold up here."], "PLAIN DOWN", 0.5, true, true];
        
    player say3D [selectrandom ["WoundedGuyA_02","WoundedGuyA_01","WoundedGuyA_03","WoundedGuyA_07","WoundedGuyA_05","WoundedGuyA_06","WoundedGuyA_08"], 15, 1];
  
    
    uiSleep MRZ_effectsCheck;
    } else {
    
    systemchat"";
    
    uiSleep MRZ_effectsCheck;
    };
    };
};

 

 

 

 

 

  • Like 4
  • Thanks 2

Share this post


Link to post
Share on other sites
2 hours ago, MuRaZorWitchKING said:

this is just someone else's work that I have revamped for a re-release. If the original author of the script no longer wants this up, this post WILL be removed.

 

That's not how this works.

You have to get permission first before releasing or "re-releasing" a tweak or modificated work made by someone else (unless stated otherwise inside the original files).

It's a bit unfortunate especially with a community that has quite some fluctuation in its member base (transition from A2 to A3 was really rough, lots of folks left for good with no way to contact them).

 

Fortunately sqf is pretty easy to get a hold of and there's still plenty of folks left that make scripts for the heck of it.

 

Cheers

Share this post


Link to post
Share on other sites
9 minutes ago, Grumpy Old Man said:

 

That's not how this works.

You have to get permission first before releasing or "re-releasing" a tweak or modificated work made by someone else (unless stated otherwise inside the original files).

It's a bit unfortunate especially with a community that has quite some fluctuation in its member base (transition from A2 to A3 was really rough, lots of folks left for good with no way to contact them).

 

Fortunately sqf is pretty easy to get a hold of and there's still plenty of folks left that make scripts for the heck of it.

 

Cheers

I did get a hold of the Exile community before re-releasing this, I'm just stating in the thread, that it isn't mine. 

 

Share this post


Link to post
Share on other sites

From Kuplion via Discord (an EXILE Moderator) :

 

"He left the Arma scene over a year ago, yeah. It’s not got any license on it so I’d just recommend adding credit for the original script and author and you’ll be ok."

Share this post


Link to post
Share on other sites

Looks like you have built upon the original script in a constructive and respectful way, thanks for sharing.  

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

May need to update this re-release, been playing my scenarios for a bit and haven't been scripting lately... The "in vehicle" variable is working within the script along with the "surfaceiswater" only problem is once you're flying over water in a helicopter or plane, Arma being Arma decides that your surface is water and that you're going to start getting cold. Another issue is that once "warm clothing" is found (warm clothing being any type of clothing NOT listed among the "warm clothing list") and you do enter water with said warm clothing the script thinks you cannot become cold now that you're in warm clothes so now the water has no effect... So I will be looking into this and fixing it. I'll probably just make a separate "cold water script" so once the player enters water in any form of clothing then they'll get cold no matter what... other than that vehicles being covering is working flawlessly, and the script as a whole... If anyone who scripts, has a fix for this feel free to share it! If not, all is well, I'll figure something out. :)

 

Cheers! :drinking2:

  • Like 1

Share this post


Link to post
Share on other sites
On 29/12/2018 at 6:58 AM, MuRaZorWitchKING said:

@GEORGE FLOROS GR Also helped me correct my errors after typing this script, couldn't of done it without this guy!

 

Thank you very much MuRaZorWitchKING !   :thumb:

 

Let's try to get the best from this game !

  • Thanks 1

Share this post


Link to post
Share on other sites

This script (without frigid water) is in my init.sqf, but It won't activate for some reason. There's no message (You are feeling healthy/You are feeling cold) as if the script simply won't activate.

 

Is there a specific place in the init.sqf where I need to place it? Since my init contains the Haleks's original intro scene, the truck, and the burning car.

 

I did place time cycle script in it, and it works, but not the weather script.

Share this post


Link to post
Share on other sites

@RZNUNKWN Under the settings tab in the script you will see a setting “

On 12/28/2018 at 9:58 PM, MuRaZorWitchKING said:

_healthyInd = false; // If true - will display a "You are healthy" status when the character is not sick or cold.

^^ This setting to be exact. Change the false setting to true and you should see “You are not cold” when the script fires. (In green)

 

 

I disabled this setting because the constant reminders of “You are not cold” can get somewhat annoying. (So it’s mainly a test setting.)

 

 

hope this helps. 

 

 

 

 

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Keep in mind that the “cold hours” of this script are located here as well, and you may need to make small edits.

 

On 12/28/2018 at 9:58 PM, MuRaZorWitchKING said:

if ((daytime >= 18 || daytime < 7)

 

Share this post


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

@RZNUNKWN Under the settings tab in the script you will see a setting “

^^ This setting to be exact. Change the false setting to true and you should see “You are not cold” when the script fires. (In green)

 

 

I disabled this setting because the constant reminders of “You are not cold” can get somewhat annoying. (So it’s mainly a test setting.)

 

 

hope this helps. 

 

 

 

I did that first, I checked the script, read the description saw that 'false' changed it to 'true' but still no sings of script being 'alive'..... :(

My init.sqf goes like this:

 

Spoiler

player enablesimulation false;
0 fadeSound 0;
startTime = date;
cutText ["","BLACK FADED",60];
hintSilent "loading...";
player addEventHandler ["killed", {3 fadeSound 0; 3 fademusic 0; 3 fadeRadio 0}];
execVM "scripts\resting.sqf";
execVM "scripts\weatherEffects.sqf";
execVM "scripts\time_cycle.sqf";
execVM "scripts\rvgFill.sqf";
execVM "scripts\intro.sqf";
sleep 5;
hintSilent "";
sleep 3;
[
    format ["<img shadow='0.2' size='6' image='%1' />", "rvg_missions\images\rvg_logo.paa"],
    safezoneX+((safeZoneH-(safeZoneW/8*(4/3)))/2), safeZoneY+((safeZoneH-(safeZoneW/5*(4/3)))/2),
    8, 7, 0, 889
] spawn bis_fnc_dynamicText;
sleep 7;
[   
    "<t  size = '0.5'>An Arma3 Mod by Haleks</t>",
    safezoneX+((safeZoneH-(safeZoneW/8*(4/3)))/2), safeZoneY+((safeZoneH-(safeZoneW/100*(4/3)))/2),
    4, 4, 0, 890
] spawn bis_fnc_dynamicText;

15 fadeSound 1;
sleep 7;
cutText ["", "BLACK IN", 20];
_radio=createTrigger["EmptyDetector",[0,0]];
_radio setTriggerActivation["Alpha","PRESENT",true];
_radio setTriggerStatements["this","0=[] execVM 'ravage\code\scripts\system\options.sqf'",""];
1 setRadioMsg "Options";

player enablesimulation true;

sleep 10;
_txt = "DAY " + str ceil (startTime call rvg_fnc_returnDays);
[_txt, safezoneX +  safezoneW - 0.65, safeZoneY + safezoneH - 0.2, 10, 0, 0, 888] spawn bis_fnc_dynamicText;
while {alive player} do {
    _d = ceil (startTime call rvg_fnc_returnDays);
    waitUntil {if (!alive player) exitWith {true}; sleep 1.5; ceil (startTime call rvg_fnc_returnDays) > _d || visibleMap};
    if (!alive player) exitWith {true};
    _txt = "DAY " + str ceil (startTime call rvg_fnc_returnDays);
    [_txt, safezoneX +  safezoneW - 0.65, safeZoneY + safezoneH - 0.2, 10, 0, 0, 888] spawn bis_fnc_dynamicText;
};
cutText ["", "BLACK OUT", 20];
sleep 3;
_n = format ["<t  size = '1'>%1</t>", ceil (startTime call rvg_fnc_returnDays) - 1];
_d = "<t  size = '1'> DAYS.</t>";
if ((ceil (startTime call rvg_fnc_returnDays) - 1) < 2) then {_d = "<t  size = '1'> DAY.</t>"};
_txt = "<t  size = '1'>YOU SURVIVED </t>" + _n + _d;
[   
    _txt,
    safezoneX+((safeZoneH-(safeZoneW/8*(4/3)))/2), safeZoneY+((safeZoneH-(safeZoneW/100*(4/3)))/2),
    60, 5, 0, 890
] spawn bis_fnc_dynamicText;

 

  • Like 1

Share this post


Link to post
Share on other sites

Do you have all the scripts organized  in a “scripts” folder in your mission file? Or are they all scattered in in the folder?

Share this post


Link to post
Share on other sites

If all the scripts are in an “organized” folder for scripts drag out the “weathereffects.sqf” file and put in in the mission directory then call it at the top of your init.sqf with

 

// [] execVM “weathereffects.sqf”; ///

Share this post


Link to post
Share on other sites

Yeah, they are in the 'scripts' folder. Will do that now, and I will drag out the 'resting' script too. Trying now.

  • Like 1

Share this post


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

Does the script disable the stamina bar?

 

No it shouldn’t, although the sicker or more cold you get it will disable sprinting. Does all work now?

  • Like 1

Share this post


Link to post
Share on other sites
33 minutes ago, MuRaZorWitchKING said:

 

No it shouldn’t, although the sicker or more cold you get it will disable sprinting. Does all work now?

Okay, just asking, I used this script once before, and it was working but I couldn't remember if it was disabling the stamina or not. I don't know if it's working or not. I'm going to give it a proper run soon. I played for 5 mins and no message appeared but had some RL stuff to do.

this is my weather script:
 

Spoiler

// weatherEffects.sqf: v4.0
 
//Changelog:

v1.5 JohnO- Removed legacy fatigue settings and put  new stamina settings in

v2.0 MuRaZorWitchKING - added colorization of effects to make them more "appealing"

v2.5 MuRaZorWitchKING - made script compatible with Ravage fireplaces that the player can place on ground

v3.0 MuRaZorWitchKING - tweaked distances required to be from fireplaces/buildings for warmth

v3.5 MuRaZorWitchKING - added in the water effects for all water to be cold within the map that is chosen

v4.0 MuRaZorWitchKING - added in land vehicles being another form of covering for players to use for warmth so buildings and fires aren't relied upon

 

// ** Weather effects by JohnO, edited by MuRaZorWitchKING **//
 
private ["_exitA","_exitB","_exitWeather","_fatigue","_rainLevel","_damage","_uniform","_cover","_fire","_distanceToCover","_distanceToFire","_showSick","_showCold","_effectsCheck","_warm","_sick","_healthyInd","_isWater","_vehicle"];
 
/** SETTINGS **/
/** Notifications **/
 
_showSick = true; //True to enable notifications "Eg You are getting sick"
_showCold = true; //True to enable notifications "Eg You are getting cold"
_effectsCheck = 60; //Time in seconds that the weather effects will apply. This time is x2, so 60 is actually 120. Due to the way the script works.
_healthyInd = true; // If true - will display a "You are healthy" status when the character is not sick or cold.
 
_coldClothes =
[
"", //NAKED - DO NOT CHANGE
"U_BasicBody",
"U_AttisBody",
"U_AntigonaBody",
"Exile_Uniform_BambiOverall",
//Civilian
"CUP_U_I_GUE_Anorak_01",
"CUP_U_I_GUE_Anorak_03",
"CUP_U_I_GUE_Anorak_02",
"CUP_U_B_BAF_DDPM_Tshirt",
"CUP_U_B_BAF_DPM_Tshirt",
"CUP_U_B_BAF_MTP_Tshirt",
"CUP_U_O_CHDKZ_Bardak",
"CUP_U_O_CHDKZ_Lopotev",
"CUP_U_O_CHDKZ_Kam_03",
"CUP_U_O_CHDKZ_Kam_01",
"CUP_U_O_CHDKZ_Kam_04",
"CUP_U_C_Citizen_02",
"CUP_U_C_Citizen_01",
"CUP_U_C_Citizen_04",
"CUP_U_C_Citizen_03",
"CUP_U_B_GER_Flecktarn_2",
"CUP_O_TKI_Khet_Jeans_04",
"CUP_O_TKI_Khet_Jeans_02",
"CUP_O_TKI_Khet_Jeans_01",
"CUP_O_TKI_Khet_Partug_04",
"CUP_O_TKI_Khet_Partug_02",
"CUP_O_TKI_Khet_Partug_01",
"CUP_O_TKI_Khet_Partug_07",
"CUP_O_TKI_Khet_Partug_08",
"CUP_O_TKI_Khet_Partug_05",
"CUP_O_TKI_Khet_Partug_06",
"CUP_U_I_GUE_Flecktarn2",
"CUP_U_I_GUE_Flecktarn3",
"CUP_U_I_GUE_Flecktarn",
"CUP_B_USMC_Navy_Brown",
"CUP_B_USMC_Navy_Green",
"CUP_B_USMC_Navy_Red",
"CUP_B_USMC_Navy_White",
"CUP_B_USMC_Navy_Yellow",
"CUP_U_C_Pilot_01",
"CUP_U_C_Profiteer_02",
"CUP_U_C_Profiteer_03",
"CUP_U_C_Profiteer_01",
"CUP_U_C_Profiteer_04",
"CUP_U_C_Rocker_02",
"CUP_U_O_SLA_Overalls_Pilot",
"CUP_U_O_SLA_Overalls_Tank",
"CUP_U_C_Woodlander_01",
"CUP_U_C_Woodlander_02",
"CUP_U_C_Woodlander_03",
"CUP_U_C_Woodlander_04",
"CUP_U_C_Worker_03",
"CUP_U_C_Worker_04",
"CUP_U_C_Worker_02",
"U_O_CombatUniform_oucamo",
"U_O_T_Soldier_F",
"U_O_CombatUniform_ocamo",
"U_I_pilotCoveralls",
"U_O_pilotCoveralls",
"U_O_T_Soldier_F",
"U_O_V_Soldier_Viper_F",
"U_O_V_Soldier_Viper_hex_F",
"rhssaf_uniform_m10_digital",
"rhssaf_uniform_m93_oakleaf",
"rhsgref_uniform_ERDL"
//Soldier
"rhs_uniform_gorka_r_g",
"rhs_uniform_gorka_r_y",
"rhsgref_uniform_para_ttsko_mountain",
"rhsgref_uniform_para_ttsko_oxblood",
"rhsgref_uniform_ttsko_urban",
"rhsgref_uniform_flecktarn",
"rhsgref_uniform_reed",
"rhsgref_uniform_woodland_olive",
"rhsgref_uniform_olive",
"rhsgref_uniform_altis_lizard_olive",
"rhs_uniform_emr_des_patchless",
"rhs_uniform_emr_patchless",
"rhs_uniform_flora_patchless",
"rhs_uniform_FROG01_wd",
"rhs_uniform_g3_m81",
"rhs_uniform_g3_rgr",
"rhs_uniform_g3_mc",
"CUP_I_B_PMC_Unit_20", 
"CUP_I_B_PMC_Unit_22", 
"CUP_I_B_PMC_Unit_21", 
"CUP_I_B_PMC_Unit_19", 
"CUP_I_B_PMC_Unit_13", 
"CUP_I_B_PMC_Unit_14", 
"CUP_I_B_PMC_Unit_15", 
"CUP_I_B_PMC_Unit_3", 
"CUP_I_B_PMC_Unit_7", 
"CUP_I_B_PMC_Unit_11", 
"CUP_I_B_PMC_Unit_23", 
"CUP_U_B_CZ_WDL_TShirt", 
"CUP_U_B_BAF_MTP_S3_RolledUp", 
"CUP_U_B_BAF_MTP_S5_UnRolled", 
"CUP_U_O_CHDKZ_Commander", 
"CUP_U_I_Ghillie_Top", 
"CUP_U_B_USMC_MARPAT_WDL_RollUpKneepad", 
"CUP_U_I_GUE_Woodland1", 
"CUP_U_O_Partisan_TTsKO", 
"CUP_U_O_Partisan_TTsKO_Mixed", 
"CUP_U_C_Policeman_01",
"CUP_U_I_RACS_PilotOverall",
"CUP_U_O_RUS_Gorka_Green",
"CUP_U_O_RUS_Gorka_Partizan_A",
"CUP_U_O_RUS_Gorka_Partizan",
"CUP_U_O_RUS_EMR_1_VDV",
"CUP_U_O_RUS_EMR_1",
"CUP_U_O_SLA_Green",
"CUP_U_B_FR_SpecOps",
"CUP_U_B_FR_DirAction",
"CUP_U_B_FR_Corpsman", 
"CUP_U_B_FR_Light",
"CUP_U_B_FR_Scout3",
"CUP_U_O_TK_Green", 
"CUP_U_O_TK_MixedCamo",
"CUP_U_B_USArmy_Soft",
"CUP_U_B_USMC_PilotOverall",
"U_O_CombatUniform_oucamo",
"U_O_T_Soldier_F",
"U_O_CombatUniform_ocamo",
"U_I_pilotCoveralls",
"U_O_pilotCoveralls",
"U_O_T_Soldier_F",
"U_O_V_Soldier_Viper_F",
"U_O_V_Soldier_Viper_hex_F",
"rhssaf_uniform_m10_digital",
"rhssaf_uniform_m93_oakleaf",
"rhsgref_uniform_ERDL"
//Guarilla
"CUP_U_C_Woodlander_01",
"CUP_U_C_Woodlander_02",
"CUP_U_C_Woodlander_03",
"CUP_U_C_Woodlander_04",
"U_O_CombatUniform_oucamo",
"U_O_T_Soldier_F",
"U_O_CombatUniform_ocamo",
"U_I_pilotCoveralls",
"U_O_pilotCoveralls",
"U_O_T_Soldier_F",
"U_O_V_Soldier_Viper_F",
"U_O_V_Soldier_Viper_hex_F",
"rhssaf_uniform_m10_digital",
"rhssaf_uniform_m93_oakleaf",
"rhsgref_uniform_ERDL"
//Special
"U_B_survival_uniform",
"U_I_Wetsuit",
"U_O_Wetsuit",
"U_B_Wetsuit",
"Exile_Uniform_Woodland"
];    
 
sick = false;
_warm = true;
cold = 0;
_sickChance = 0;
sickValue = 0;
_fatigue = 0;
_rainLevel = rain;
_damage = damage player;
_uniform = uniform player;
_cover = nearestBuilding player;
_fire = nearestObject[player,"FirePlace_burning_F"];
_distanceToCover = player distance _cover;
_distanceToFire = player distance _fire;
_isWater = surfaceIsWater position player;
_vehicle = vehicle player iskindOf "LandVehicle";

 

[sick,sickValue,cold] spawn
{
        _exitA = false;
        waituntil
        {
               
                if (!alive player) then
                {    
                        sick = false;
                        cold = 0;
                        sickValue = 0;
                        player enableStamina true;
                        player allowSprint true;
                };
                uiSleep 1;
                _exitA      
        };        
           
};
 
[] spawn
{
        _exitB = false;      
        waituntil
        {
                if (damage player > 0.75) then
                {      
                        enableCamShake true;
                        addCamShake [5, 3, 30];
                        uiSleep 5;
                };
                uiSleep 1;
                _exitB
        };      
};
 
_exitWeather = false;
waitUntil
{    
        if (alive player) then
        {        
                if (_healthyInd) then
                {      
                        if ((!sick) && (_warm) && (sickValue <= 0)) then
                        {
                                titleText ["<t color='#00ff00' size='1' align='left' valign='bottom'>You are Not Cold</t><br/>", "PLAIN DOWN", 0.5, true, true];

                        };
                };
         
                if (sickValue <= 0) then
                {
                        sickValue = 0;
                }
                else
                {
                        if (sickValue >= 1) then
                        {
                                sickValue = 1;
                        };
                };
                if (cold <= 0) then
                {                
                        cold = 0;
                }
                else
                {
                        if (cold >= 1) then
                        {
                                cold = 0.9;
                        };
                };
                                               
                uiSleep _effectsCheck;
         
                _rainLevel = rain;
                _damage = damage player;
                _uniform = uniform player;
                _cover = nearestBuilding player;
                _fire = nearestObject [player,"FirePlace_burning_F"];
                _distanceToCover = player distance _cover;
                _distanceToFire = player distance _fire;
                _isWater = surfaceIsWater position player;
                _vehicle = vehicle player iskindOf "LandVehicle";
                

                if ((daytime >= 18 || daytime < 7) || (_rainLevel > 0.2 )) then {_warm = false};
          
                if !((player == vehicle player)) then {_warm = true};
                if ((_isWater)) then {_warm = false};
                if ((!_warm) && (_uniform in _coldClothes)) then {_warm = false};
                if ((!_warm) && (_distanceToFire < 5) || (_distanceToCover < 15)) then {_warm = true};
         if !(_uniform in _coldClothes) then {_warm = true};
               
                if (_warm) then
                {
                        _warm = true;
                        cold = cold - 0.1;
                        if (cold <= 0) then
                        {
                                if (sickValue >= 0) then
                                {
                                        sickValue = sickValue - 0.05;
                                        if (sickValue <= 0.25) then
                                        {
                                                sick = false;
                                                enableCamShake false;
                                                player enableStamina true;
                                                player allowSprint true;
                                                uiSleep 1;
                                                if ((_showSick) && (sickValue >= 0 && sickValue <= 0.25)) then
                                                {
                                                        titleText ["<t color='#587209' size='1' align='left' valign='bottom'>You are feeling better</t><br/>", "PLAIN DOWN", 0.5, true, true];
                                                };
                                        };
                                };    
                        };
                }
                else
                {
                        _warm = false;
                        cold = cold + 0.1;
                };
                if ((_showCold) && (cold >= 0 && cold <=0.1) && (!_warm)) then
                {
                        titleText ["<t color='#42aaf4' size='1' align='left' valign='bottom'> You are getting Cold</t><br/>", "PLAIN DOWN", 0.5, true, true];
                }
                else
                {
                        if ((_showCold) && (cold >= 0.2 && cold <= 0.3) && (!_warm)) then
                        {
                                titleText ["<t color='#193066' size='1' align='left' valign='bottom'>You are Freezing</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                        };
               };
         
                uiSleep _effectsCheck;
               
                if ((cold > 0.3) && (!_warm)) then
                {
                        cold = cold + 0.1;
                        player setDamage _damage +0.07;
                        enableCamShake true;
                        addCamShake [5, 3, 60];
                        if (_showCold) then
                        {
                                titleText ["<t color='#2b176d' size='1' align='left' valign='bottom'>You are Freezing to Death</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                        };
                };
               
                if ((!_warm) && (cold > 0.3 )) then
                {
                        _sickChance = random 1;
         
                        if ((_sickChance > 0.5) || (sickValue > 0)) then
                        {
                                sick = true;
                                sickValue = sickValue + 0.05;
                                if ((_showSick) && (sickValue < 0.25)) then
                                {
         
                                        titleText ["<t color='#b25905' size='1' align='left' valign='bottom'>You are Getting Sick</t><br/>", "PLAIN DOWN", 0.5, true, true];
         
                                };
                                if ((sickValue > 0.25) && (sickValue < 0.50)) then
                                {
                                        player enableStamina true;
                                        player allowSprint false;
                                        enableCamShake true;
                                        addCamShake [5, 3, 30];
                                       
         
                                        if (_showSick) then
                                        {
                                                titleText ["<t color='#c9701e' size='1' align='left' valign='bottom'>You are Very Sick</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
      
                                        };
                                }
                                else
                                {
                                        if (sickValue > 0.50) then
                                        {
                                                player enableStamina true;
                                                player allowSprint false;
                                                enableCamShake true;
                                                addCamShake [10, 10, 15];
                                                [120] call BIS_fnc_bloodEffect;
                                                player setDamage _damage + 0.02;
                                               
         
                                                if (_showSick) then
                                                {
                                                        titleText ["<t color='#a80b0b' size='1' align='left' valign='bottom'>You are Dying</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                                                };
                                        };
                                };
                        };
                };            
                if ((_warm) && (sick)) then
                {      
                        if ((_showSick) && (sickValue < 0.25)) then
                        {
                                titleText ["<t color='#90a014' size='1' align='left' valign='bottom'>You are Sick</t><br/>", "PLAIN DOWN", 0.5, true, true];
                        };
                        if ((sickValue > 0.25) && (sickValue < 0.50)) then
                        {
                               
                                enableCamShake true;
                                addCamShake [5, 3, 30];
                               
         
                                if (_showSick) then
                                {
                                        titleText ["<t color='#c9701e' size='1' align='left' valign='bottom'>You are Very Sick</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                                };
                        }
                        else
                        {
                                if (sickValue > 0.50) then
                                {
                                        player enableStamina true;
                                        player allowSprint false;
                                        enableCamShake true;
                                        addCamShake [10, 10, 15];
                                        [120] call BIS_fnc_bloodEffect;
                                        player setDamage _damage + 0.02;
                                       
         
                                        if (_showSick) then
                                        {
                                                titleText ["<t color='#a80b0b' size='1' align='left' valign='bottom'>You are Dying</t><br/>", "PLAIN DOWN", 0.5, true, true];
                                        };
                                };
                        };
                };
        };
        uiSleep 1;
        _exitWeather  
};

I added RHS SAF uniforms everywhere, but as I understood, every clothing is considered 'cold', maybe I messed up the script somehow, tho I don't get any errors in the editor when I test it. I basically added every RHS and CUP clothing from Ravage list since they are the one being used.

Share this post


Link to post
Share on other sites

@RZNUNKWN use the updated version, I had to modify the script alittle yesterday and I removed all the “_isWater” from the script as it was having issues... other than that your script looks good... What did you name the .sqf file for the weathereffects? Or is it “weathereffects.sqf”? Cause spelling could be an issue too. (Not saying you can’t spell, I’ve even done this lol)

 

I’m also not at my computer atm, at work :/ but I’ll definitely try to help you out as much as I can! 

  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, RZNUNKWN said:

but as I understood, every clothing is considered 'cold'

All clothing listed in the script is classified as cold clothing yes, all clothing NOT listed in the script are considered warm clothing.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, MuRaZorWitchKING said:

@RZNUNKWN use the updated version, I had to modify the script alittle yesterday and I removed all the “_isWater” from the script as it was having issues... other than that your script looks good... What did you name the .sqf file for the weathereffects? Or is it “weathereffects.sqf”? Cause spelling could be an issue too. (Not saying you can’t spell, I’ve even done this lol)

 

I’m also not at my computer atm, at work :/ but I’ll definitely try to help you out as much as I can! 

I thought this was the updated version? If not where can I find it or maybe can you send it to me? I just spend a couple of hours playing, it's not working. And yeah I've spent quite some time just looking at the name it's "weatherEffects.sqf"  I'm really out of ideas, and I have no clue how it worked last time...

Are they CaSe SeNsItIvE perhaps?

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, RZNUNKWN said:

I thought this was the updated version? If not where can I find it or maybe can you send it to me? I just spend a couple of hours playing, it's not working. And yeah I've spent quite some time just looking at the name it's "weatherEffects.sqf"  I'm really out of ideas, and I have no clue how it worked last time...

Are they CaSe SeNsItIvE perhaps?

I meant re-copy the script, I updated it in the thread, it no longer uses the “_inWater” condition. And most are case sensitive yes. Hope this solves your problem.

 

let me know man! :thumb:

  • Thanks 1

Share this post


Link to post
Share on other sites

@RZNUNKWN I fixed the script you sent me, you were missing multiple "", in the script but all is good and it should be fixed //Tested on my PC// :) Here it is:

 

Spoiler

// weatherEffects.sqf: v4.0

//Changelog: Check Forums For full list

// ** Weather effects by JohnO, edited by MuRaZorWitchKING **//
 
private ["_exitA","_exitB","_exitWeather","_fatigue","_rainLevel","_damage","_uniform","_cover","_fire","_distanceToCover","_distanceToFire","_showSick","_showCold","_effectsCheck","_warm","_sick","_healthyInd","_vehicle"];
 
/** SETTINGS **/
/** Notifications **/
 
_showSick = true; //True to enable notifications "Eg You are getting sick"
_showCold = true; //True to enable notifications "Eg You are getting cold"
_effectsCheck = 60; //Time in seconds that the weather effects will apply. This time is x2, so 60 is actually 120. Due to the way the script works.
_healthyInd = true; // If true - will display a "You are healthy" status when the character is not sick or cold.
 
_coldClothes =
[
"", //NAKED - DO NOT CHANGE
"U_BasicBody",
"U_AttisBody",
"U_AntigonaBody",
"Exile_Uniform_BambiOverall",
//Civilian
"CUP_U_I_GUE_Anorak_01",
"CUP_U_I_GUE_Anorak_03",
"CUP_U_I_GUE_Anorak_02",
"CUP_U_B_BAF_DDPM_Tshirt",
"CUP_U_B_BAF_DPM_Tshirt",
"CUP_U_B_BAF_MTP_Tshirt",
"CUP_U_O_CHDKZ_Bardak",
"CUP_U_O_CHDKZ_Lopotev",
"CUP_U_O_CHDKZ_Kam_03",
"CUP_U_O_CHDKZ_Kam_01",
"CUP_U_O_CHDKZ_Kam_04",
"CUP_U_C_Citizen_02",
"CUP_U_C_Citizen_01",
"CUP_U_C_Citizen_04",
"CUP_U_C_Citizen_03",
"CUP_U_B_GER_Flecktarn_2",
"CUP_O_TKI_Khet_Jeans_04",
"CUP_O_TKI_Khet_Jeans_02",
"CUP_O_TKI_Khet_Jeans_01",
"CUP_O_TKI_Khet_Partug_04",
"CUP_O_TKI_Khet_Partug_02",
"CUP_O_TKI_Khet_Partug_01",
"CUP_O_TKI_Khet_Partug_07",
"CUP_O_TKI_Khet_Partug_08",
"CUP_O_TKI_Khet_Partug_05",
"CUP_O_TKI_Khet_Partug_06",
"CUP_U_I_GUE_Flecktarn2",
"CUP_U_I_GUE_Flecktarn3",
"CUP_U_I_GUE_Flecktarn",
"CUP_B_USMC_Navy_Brown",
"CUP_B_USMC_Navy_Green",
"CUP_B_USMC_Navy_Red",
"CUP_B_USMC_Navy_White",
"CUP_B_USMC_Navy_Yellow",
"CUP_U_C_Pilot_01",
"CUP_U_C_Profiteer_02",
"CUP_U_C_Profiteer_03",
"CUP_U_C_Profiteer_01",
"CUP_U_C_Profiteer_04",
"CUP_U_C_Rocker_02",
"CUP_U_O_SLA_Overalls_Pilot",
"CUP_U_O_SLA_Overalls_Tank",
"CUP_U_C_Woodlander_01",
"CUP_U_C_Woodlander_02",
"CUP_U_C_Woodlander_03",
"CUP_U_C_Woodlander_04",
"CUP_U_C_Worker_03",
"CUP_U_C_Worker_04",
"CUP_U_C_Worker_02",
"U_O_CombatUniform_oucamo",
"U_O_T_Soldier_F",
"U_O_CombatUniform_ocamo",
"U_I_pilotCoveralls",
"U_O_pilotCoveralls",
"U_O_T_Soldier_F",
"U_O_V_Soldier_Viper_F",
"U_O_V_Soldier_Viper_hex_F",
"rhssaf_uniform_m10_digital",
"rhssaf_uniform_m93_oakleaf",
"rhsgref_uniform_ERDL",
//Soldier
"rhs_uniform_gorka_r_g",
"rhs_uniform_gorka_r_y",
"rhsgref_uniform_para_ttsko_mountain",
"rhsgref_uniform_para_ttsko_oxblood",
"rhsgref_uniform_ttsko_urban",
"rhsgref_uniform_flecktarn",
"rhsgref_uniform_reed",
"rhsgref_uniform_woodland_olive",
"rhsgref_uniform_olive",
"rhsgref_uniform_altis_lizard_olive",
"rhs_uniform_emr_des_patchless",
"rhs_uniform_emr_patchless",
"rhs_uniform_flora_patchless",
"rhs_uniform_FROG01_wd",
"rhs_uniform_g3_m81",
"rhs_uniform_g3_rgr",
"rhs_uniform_g3_mc",
"CUP_I_B_PMC_Unit_20", 
"CUP_I_B_PMC_Unit_22", 
"CUP_I_B_PMC_Unit_21", 
"CUP_I_B_PMC_Unit_19", 
"CUP_I_B_PMC_Unit_13", 
"CUP_I_B_PMC_Unit_14", 
"CUP_I_B_PMC_Unit_15", 
"CUP_I_B_PMC_Unit_3", 
"CUP_I_B_PMC_Unit_7", 
"CUP_I_B_PMC_Unit_11", 
"CUP_I_B_PMC_Unit_23", 
"CUP_U_B_CZ_WDL_TShirt", 
"CUP_U_B_BAF_MTP_S3_RolledUp", 
"CUP_U_B_BAF_MTP_S5_UnRolled", 
"CUP_U_O_CHDKZ_Commander", 
"CUP_U_I_Ghillie_Top", 
"CUP_U_B_USMC_MARPAT_WDL_RollUpKneepad", 
"CUP_U_I_GUE_Woodland1", 
"CUP_U_O_Partisan_TTsKO", 
"CUP_U_O_Partisan_TTsKO_Mixed", 
"CUP_U_C_Policeman_01",
"CUP_U_I_RACS_PilotOverall",
"CUP_U_O_RUS_Gorka_Green",
"CUP_U_O_RUS_Gorka_Partizan_A",
"CUP_U_O_RUS_Gorka_Partizan",
"CUP_U_O_RUS_EMR_1_VDV",
"CUP_U_O_RUS_EMR_1",
"CUP_U_O_SLA_Green",
"CUP_U_B_FR_SpecOps",
"CUP_U_B_FR_DirAction",
"CUP_U_B_FR_Corpsman", 
"CUP_U_B_FR_Light",
"CUP_U_B_FR_Scout3",
"CUP_U_O_TK_Green", 
"CUP_U_O_TK_MixedCamo",
"CUP_U_B_USArmy_Soft",
"CUP_U_B_USMC_PilotOverall",
"U_O_CombatUniform_oucamo",
"U_O_T_Soldier_F",
"U_O_CombatUniform_ocamo",
"U_I_pilotCoveralls",
"U_O_pilotCoveralls",
"U_O_T_Soldier_F",
"U_O_V_Soldier_Viper_F",
"U_O_V_Soldier_Viper_hex_F",
"rhssaf_uniform_m10_digital",
"rhssaf_uniform_m93_oakleaf",
"rhsgref_uniform_ERDL",
//Guarilla
"CUP_U_C_Woodlander_01",
"CUP_U_C_Woodlander_02",
"CUP_U_C_Woodlander_03",
"CUP_U_C_Woodlander_04",
"U_O_CombatUniform_oucamo",
"U_O_T_Soldier_F",
"U_O_CombatUniform_ocamo",
"U_I_pilotCoveralls",
"U_O_pilotCoveralls",
"U_O_T_Soldier_F",
"U_O_V_Soldier_Viper_F",
"U_O_V_Soldier_Viper_hex_F",
"rhssaf_uniform_m10_digital",
"rhssaf_uniform_m93_oakleaf",
"rhsgref_uniform_ERDL",
//Special
"U_B_survival_uniform",
"U_I_Wetsuit",
"U_O_Wetsuit",
"U_B_Wetsuit",
"Exile_Uniform_Woodland"
];    
 
sick = false;
_warm = true;
cold = 0;
_sickChance = 0;
sickValue = 0;
_fatigue = 0;
_rainLevel = rain;
_damage = damage player;
_uniform = uniform player;
_cover = nearestBuilding player;
_fire = nearestObject[player,"FirePlace_burning_F"];
_distanceToCover = player distance _cover;
_distanceToFire = player distance _fire;
_vehicle = vehicle player iskindOf "LandVehicle";

 

[sick,sickValue,cold] spawn
{
        _exitA = false;
        waituntil
        {
               
                if (!alive player) then
                {    
                        sick = false;
                        cold = 0;
                        sickValue = 0;
                        player enableStamina true;
                        player allowSprint true;
                };
                uiSleep 1;
                _exitA      
        };        
           
};
 
[] spawn
{
        _exitB = false;      
        waituntil
        {
                if (damage player > 0.75) then
                {      
                        enableCamShake true;
                        addCamShake [5, 3, 30];
                        uiSleep 5;
                };
                uiSleep 1;
                _exitB
        };      
};
 
_exitWeather = false;
waitUntil
{    
        if (alive player) then
        {        
                if (_healthyInd) then
                {      
                        if ((!sick) && (_warm) && (sickValue <= 0)) then
                        {
                                titleText ["<t color='#00ff00' size='1' align='left' valign='bottom'>You are Not Cold</t><br/>", "PLAIN DOWN", 0.5, true, true];

                        };
                };
         
                if (sickValue <= 0) then
                {
                        sickValue = 0;
                }
                else
                {
                        if (sickValue >= 1) then
                        {
                                sickValue = 1;
                        };
                };
                if (cold <= 0) then
                {                
                        cold = 0;
                }
                else
                {
                        if (cold >= 1) then
                        {
                                cold = 0.9;
                        };
                };
                                               
                uiSleep _effectsCheck;
         
                _rainLevel = rain;
                _damage = damage player;
                _uniform = uniform player;
                _cover = nearestBuilding player;
                _fire = nearestObject [player,"FirePlace_burning_F"];
                _distanceToCover = player distance _cover;
                _distanceToFire = player distance _fire;
                _vehicle = vehicle player iskindOf "LandVehicle";
                

                if ((daytime >= 18 || daytime < 7) || (_rainLevel > 0.2 )) then {_warm = false};
          
                if !((player == vehicle player)) then {_warm = true};
                if ((!_warm) && (_uniform in _coldClothes)) then {_warm = false};
                if ((!_warm) && (_distanceToFire < 5) || (_distanceToCover < 15)) then {_warm = true};
         if !(_uniform in _coldClothes) then {_warm = true};
               
                if (_warm) then
                {
                        _warm = true;
                        cold = cold - 0.1;
                        if (cold <= 0) then
                        {
                                if (sickValue >= 0) then
                                {
                                        sickValue = sickValue - 0.05;
                                        if (sickValue <= 0.25) then
                                        {
                                                sick = false;
                                                enableCamShake false;
                                                player enableStamina true;
                                                player allowSprint true;
                                                uiSleep 1;
                                                if ((_showSick) && (sickValue >= 0 && sickValue <= 0.25)) then
                                                {
                                                        titleText ["<t color='#587209' size='1' align='left' valign='bottom'>You are feeling better</t><br/>", "PLAIN DOWN", 0.5, true, true];
                                                };
                                        };
                                };    
                        };
                }
                else
                {
                        _warm = false;
                        cold = cold + 0.1;
                };
                if ((_showCold) && (cold >= 0 && cold <=0.1) && (!_warm)) then
                {
                        titleText ["<t color='#42aaf4' size='1' align='left' valign='bottom'> You are getting Cold</t><br/>", "PLAIN DOWN", 0.5, true, true];
                }
                else
                {
                        if ((_showCold) && (cold >= 0.2 && cold <= 0.3) && (!_warm)) then
                        {
                                titleText ["<t color='#193066' size='1' align='left' valign='bottom'>You are Freezing</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                        };
               };
         
                uiSleep _effectsCheck;
               
                if ((cold > 0.3) && (!_warm)) then
                {
                        cold = cold + 0.1;
                        player setDamage _damage +0.07;
                        enableCamShake true;
                        addCamShake [5, 3, 60];
                        if (_showCold) then
                        {
                                titleText ["<t color='#2b176d' size='1' align='left' valign='bottom'>You are Freezing to Death</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                        };
                };
               
                if ((!_warm) && (cold > 0.3 )) then
                {
                        _sickChance = random 1;
         
                        if ((_sickChance > 0.5) || (sickValue > 0)) then
                        {
                                sick = true;
                                sickValue = sickValue + 0.05;
                                if ((_showSick) && (sickValue < 0.25)) then
                                {
         
                                        titleText ["<t color='#b25905' size='1' align='left' valign='bottom'>You are Getting Sick</t><br/>", "PLAIN DOWN", 0.5, true, true];
         
                                };
                                if ((sickValue > 0.25) && (sickValue < 0.50)) then
                                {
                                        player enableStamina true;
                                        player allowSprint false;
                                        enableCamShake true;
                                        addCamShake [5, 3, 30];
                                       
         
                                        if (_showSick) then
                                        {
                                                titleText ["<t color='#c9701e' size='1' align='left' valign='bottom'>You are Very Sick</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
      
                                        };
                                }
                                else
                                {
                                        if (sickValue > 0.50) then
                                        {
                                                player enableStamina true;
                                                player allowSprint false;
                                                enableCamShake true;
                                                addCamShake [10, 10, 15];
                                                [120] call BIS_fnc_bloodEffect;
                                                player setDamage _damage + 0.02;
                                               
         
                                                if (_showSick) then
                                                {
                                                        titleText ["<t color='#a80b0b' size='1' align='left' valign='bottom'>You are Dying</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                                                };
                                        };
                                };
                        };
                };            
                if ((_warm) && (sick)) then
                {      
                        if ((_showSick) && (sickValue < 0.25)) then
                        {
                                titleText ["<t color='#90a014' size='1' align='left' valign='bottom'>You are Sick</t><br/>", "PLAIN DOWN", 0.5, true, true];
                        };
                        if ((sickValue > 0.25) && (sickValue < 0.50)) then
                        {
                               
                                enableCamShake true;
                                addCamShake [5, 3, 30];
                               
         
                                if (_showSick) then
                                {
                                        titleText ["<t color='#c9701e' size='1' align='left' valign='bottom'>You are Very Sick</t><br/>", "PLAIN DOWN", 0.5, true, true]; 
                                };
                        }
                        else
                        {
                                if (sickValue > 0.50) then
                                {
                                        player enableStamina true;
                                        player allowSprint false;
                                        enableCamShake true;
                                        addCamShake [10, 10, 15];
                                        [120] call BIS_fnc_bloodEffect;
                                        player setDamage _damage + 0.02;
                                       
         
                                        if (_showSick) then
                                        {
                                                titleText ["<t color='#a80b0b' size='1' align='left' valign='bottom'>You are Dying</t><br/>", "PLAIN DOWN", 0.5, true, true];
                                        };
                                };
                        };
                };
        };
        uiSleep 1;
        _exitWeather  
};

 

Remember to put this script into it's own .sqf file for example "WeatherEffects.sqf" and when you call it in the init.sqf you want to make sure the called script matches //it is CaSE SeNSiTivE// so you would call it with [] execVM "WeatherEffects.sqf";

 

Cheers!  :teeth:

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Oh wow, it works!! Thanks @MuRaZorWitchKING and I'm sorry for all the bothering!

 

Did I forget to put " in some classanmes? And is there a way to disable the stamina at all, I changed "player enableStamina true" to false, but the script seems to reset the stamina bar every now and then. I'm used to playing without the stamina bar.

  • Like 1

Share this post


Link to post
Share on other sites

@RZNUNKWN No, no, no! You didn’t bother me at all! I enjoy helping when I can :)!! 

 

As for the classnames thing the only thing you had errors on was your listing, the list keeps going so you need a “”, after each classname, you were just missing a couple. (No worries! :rthumb:)

 

And as far as the stamina system goes, yes you can disable it entirely... I’d just have to view it again. I believe somewhere in JohnO’s original release he DOES have stamina disabled... (I could be wrong, been awhile.) If I were you I’d compare the original to the version you are currently using see what is different, or the same.

 

The original release can be found here:

 

https://www.exilemod.com/topic/7717-detrimental-weather-effects-script/

 

 

 

Cheers! :drinking2:

  • 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

×