This is a great idea! Very original!
I'll make a video of it on saturday.
ST_Dux: "Conspiracy theorists aren't the great skeptics that they envision themselves to be; they are a weak sort who cannot for the life of them accept the fact that some things -- most things, actually -- happen for no reason at all. There is no master plot; there is no system; the only thing consistent in this world is inconsistency.
Maybe it won't work because of the limitation to VBS 2.
But i've searched the commands-list and found that:
http://community.bistudio.com/wiki/precision
Still can't find anything really useful about the breathingrate/tiredness/weapon-accuracy..
I'll keep looking.
Edit: Furthermore you could combine the breathing-script with the mission-time. Especially when the mission plays from dusk until night, the enabling of Breath Fog would increase the atmosphere.
Last edited by Egosa-U; Jan 28 2011 at 12:46.
I tried now to combine the fog with the mission-time, but haven't got that much experience with sqf-scripting.
I tried to define on which times the fog should be dense and when not.
Basically I setup the following times:
From 0am to 3am : dense fog
from 3am to 6am : less dense fog
from 6am to 6pm: nofog
from 6pm to 20pm: less dense fog
and from 20pm to 24pm: dense fog
So i expanded the code with additional parameters, but can't get it to work.
I think it may have something to do with passing the _int parameter.
Additionally, it should continue checking the time to make sure the fog-density is right.
Hoping, someone can help...
Heres the modified code:
Spoiler:
Hi egosa-u. I'm not in front of my arma box but looking at your code I can't really see why it shouldn't work. I actually combine my fog script with another one which determines the angle of the sun from the horizon. When the sun is below horizon = foggy breath. I will post this when I get home.
OK, here's the weay I do it. The sun angle stuff is adapted from some code that CarlGustaffa gave me, so props to him!
Let me know if you have probs with it.
Code:// Determine the angle of the sun (ie is it dark or not), adapted from CarlGustaffa [] spawn {while {alive player} do { private ["_lat", "_day", "_hour", "_angle", "_isday"]; //Not 100% correct to BIS own code, but it does the trick. _lat = -1 * getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude"); //Arma latitude is negated for some odd reason. _day = 360 * (dateToNumber date); //Convert current day to 360 for trigonometric calculations. _hour = (daytime / 24) * 360; //Convert current hours to 360 for trigonometric calculations. sunangle = ((12 * cos(_day) - 78) * cos(_lat) * cos(_hour)) - (24 * sin(_lat) * cos(_day)); //update every 5 minutes sleep 300; }; }; private ["_unit"]; _unit = _this select 0; _int = _this select 1; //intensity of fog (0 to 1) while {alive _unit} do { if (sunangle < 0) then { // only fog breath if sun is below horizon sleep (2 + random 2); // random time between breaths _source = "logic" createVehicleLocal (getpos _unit); _fog = "#particlesource" createVehicleLocal getpos _source; _fog setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 13,0], "", "Billboard", 0.5, 0.5, [0,0,0], [0, 0.2, -0.2], 1, 1.275, 1, 0.2, [0, 0.2,0], [[1,1,1, _int], [1,1,1, 0.01], [1,1,1, 0]], [1000], 1, 0.04, "", "", _source]; _fog setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10]; _fog setDropInterval 0.001; _source attachto [_unit,[0,0.15,0], "neck"]; // get fog to come out of player mouth sleep 0.5; // 1/2 second exhalation deletevehicle _source; }}
Sorry to revive this thread, but how do you set the breath (fog) to dissapear faster?
In my mission I have:
And the breath looks like it's ejecting out of the player at maximum speed in a straight line.Code:setWind [0,10, true];
Edit:
Hah, nevermind. Figured it out by counting how long the fog was alive for and turned out to be ~2. So I looked for something that equaled "2" and it's here:
Just change the 2 to something like:Code:_fog setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
Code:_fog setParticleRandom [.1, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
Last edited by Semedar; Dec 6 2011 at 05:01.
CPU: i7 960 [4.0GHz] | Motherboard: P6T Deluxe V2 | Memory: Kingston HyperX T1 Series 12GB
Graphics Card: ASUS GeForce GTX 590 | Monitor: ASUS VG236HE 23" [1920x1080 | 120Hz]
Hard Drive: Patriot Torqx 2 32GB SSD | ADATA 64GB SSD | Seagate Barracuda XT 2TB HDD
Case: Cooler Master HAF 932 | Power Supply: Corsair AX850 | CPU Cooling: Corsair H70 [Exhaust | PP] | Shin-Etsu G751
Glad you figured it out Semedar, because I can't remember how I did it! Also, glad that someone is actually using the script!
We're making use of it in Invasion 1944 tooThough it might not be too visible in that video. Great subtle effect that definitely adds a lot to the atmosphere ingame!