Jump to content

Recommended Posts

11.jpg 71.jpg

31.jpg 41.jpg

61.jpg

I have reworked Yac`s scripts in a fsm for more atmosphere.You have now more options and more performance.Its a client-side script, it works in the Editor/SP and on a non-dedicated-server too and you can use markers to place it.

The script will not run on the dedicated-server-side and the server will not sychronize the fog, because it would cause to much lags,otherwise the server would synchronize 50-300 clouds per second and every cloud would have 5-10 synchronized values and that is to much.

Download: Fog_v1.62.rar

MD5: 5d76783c9153502f45da05e1be743c44

Install:

Open the editor, create a new unit/object and put the example into the init of the unit, after that replace 'l1' with 'Player' and save the mission.

Then open the folder .../Dokuments/ArmA 2 Other Profiles/Nickname/missions/misisonsname and copy the script into the folder.

example: null=[l1,100,11,10,3,7,-0.3,0.1,0.5,1,1,1,13,12,15,true,2,2.1,0.1,4,6,0,3.5,17.5] execFSM "Fog.fsm";

l1 = name of unit (use "" for markers and when you on a multiplayer session only want to set the fog around the player: run the script once! with 'Player' (not 'this' and not 'name of the unit/object'!!!), example: null=[Player,200,10,... )

If the unit/building was destroyed/died or the marker was deleted, the script will exit automatically!

100 = Maximumdistance

11 = Minimumdistance

10 = Count of clouds

3 = Minimumsize of clouds

7 = Maximumsize of clouds

-0.3 = Height of clouds (must be a bit below the ground to look realistic)

0.1 = Respawntime of clouds

0.5 = Transparency

1,1,1 = Color of clouds

13 = Remove-speed of clouds

12 = Minimumlifetime of clouds

15 = Maximumlifetime of clouds

true = The fog will be effected by wind (for no wind effect: false)

2 = Windstrength (acts only when the wind effect is 'true')

2.1 = Random-direction-period(in seconds) (acts only when the wind effect is 'true')

0.1 = Random-direction-intensity (acts only when the wind effect is 'true')

4,6,0 = Move-direction-speed (x,y,z) - same effect as wind, but constant and adjustable(acts only when the wind effect is 'false')

3.5 = Stardaytime (the fog will spawn when the ingametime is not earlier than 03:30)

17.5 = Enddaytime (the fog will spawn when the ingametime is not later than 17:30)

RandomDirectionPeriod 2.1 with RandomDirectionIntensity 0.1 means that 0.1 will be added to the direction-speed (x,y,z-randomized) of a moving-cloud every 2.1 seconds.

An example for norrins revive-script:

revive_init.sqf:

NORRNCustomExec1 ="null=[Player,100,11,10,3,7,-0.3,0.1,0.5,1,1,1,13,12,15,true,1,2.1,0.1,4,6,0,0,24] execFSM ""Fog.fsm"";"; // Exec1 occurs following being revived

NORRNCustomExec3 ="null=[Player,100,11,10,3,7,-0.3,0.1,0.5,1,1,1,13,12,15,true,1,2.1,0.1,4,6,0,0,24] execFSM ""Fog.fsm"";"; // Exec3 occurs when you spawn at base

#Update 1:

Fixed: Position Error

#Update 2:

script optimized

#Update 3:

If the marker will be deleted, the script will exit and will not continue to spawn the fog at position [0,0,0].

If the unit/building is dead/destroyed, the script will exit and will not cotinue to spawn the fog at the last position.

#Update 4:

Fixed: clouds spawned twice

#Update 5:

More options:

Releasetime of clouds

Lifetime of clouds

Move-direction-speed of clouds(x)

Move-direction-speed of clouds(y)

Move-direction-speed of clouds(z)

#Update 6:

The most of the options musn`t be set to get no errors (Only the first option must be set)

When a option isn`t set, it will get a stanard value.

Fixed: Maximumdistance doesn`t work correctly (Thanks to Celery)

More options:

Effect by wind

minimum and maximum options for the size of clouds

#Update 6.1:

Fixed: Minimumdistance doesn`t work correctly (Thanks to Celery)

More options:

Wind strength

minimum and maximum options for the lifetime of clouds

#Update 6.2:

script optimized

More Options:

Random-direction-period (in seconds) (acts only when the wind effect is 'true')

Random-direction-intensity (acts only when the wind effect is 'true')

Startdaytime (24 hour clock)

Enddaytime (24 hour clock)

Credits:

Yac for the original Script

Edited by Rockhount
  • Like 1

Share this post


Link to post
Share on other sites

Looking nice but how do you make it spawn around the player as he moves?

I was initializing it with both the player unit and 'this' as a name and 'player'. But it only spawns around the initial position of my unit.

Share this post


Link to post
Share on other sites

This is great. Using it in Virtual Training System by L'etranger. Works extremely well!

Good job!

Share this post


Link to post
Share on other sites

very nice! will get. 2 questions - does the mist block AI vision? is it affected by wind?

Share this post


Link to post
Share on other sites

-1.Yes it will block the AI, but only when you have massive and high fog. But the AI must be more than 80-100 meters far away, if they shouldn`t spot you.

-2.It isn`t effected by wind.

Edit: only when you hit the AI through the massive fog, they will spot you

Edited by Rockhount

Share this post


Link to post
Share on other sites

thanks Rockhount

but the archiv is damaged

possibly upload again :)

greetz miller

Share this post


Link to post
Share on other sites

Hey Miller, the file is on my webspace. The data is not corrupted, recheck again with other extraction program.

Share this post


Link to post
Share on other sites
Hey Miller, the file is on my webspace. The data is not corrupted, recheck again with other extraction program.

Ah, now it works thanks :)

Share this post


Link to post
Share on other sites

Script updated to version 1.4

Edited by Rockhount

Share this post


Link to post
Share on other sites

Do I just dump this in my mission folder?

Looks fantastic!

Share this post


Link to post
Share on other sites

Thanks for all your efforts putting this coolness together :ok:

Share this post


Link to post
Share on other sites

lrn 2 read:

"Its a client-side script but it works in the Editor/SP too and you can use markers to place it."

Share this post


Link to post
Share on other sites

The fog will be created only on the client-side, never on the server-side and the server will not synchronize the fog.

Edited by Rockhount

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

×