Narrative stories Iran's war with America and Israel In Iraq ....

Report abuse scripts
Filename
scripts.rar
Type
Mapping Tool
Uploader
AFM-RAYAN
Date
Jan 11th, 2012
Size
0.01mb (6,255 bytes)
Downloads
1,311 (1 today)
Embed Button
Mirrors
Download now
Description

Adding Weather Effects Adding skybox and Rain and snow ... to Your Map


Note: If you are creating a single-player map and wish to add weather effects to it, name this INI file solo.ini instead of map.ini.

Once you have created your map.ini (or solo.ini) file in the proper location, we can add a Weather section to the file. A Weather block allows you to specify custom weather-related settings for your map.
Adding Snow to Your Map

To add snow to your map, paste the following block of code into your INI file (the one described above):
Weather
SnowEnabled = yes ; enable/disable snow on the map.
SnowTexture = ExSnowFlake.tga ; texture used for each snow particle.
SnowBoxDimensions = 100 ; width/height of box around camera containing snow.
SnowBoxDensity = 1 ; amount of snow particles per world-unit. Raise to increase particle count.
SnowFrequencyScaleX = 0.0533 ; speed of side-to-side wave movement.
SnowFrequencyScaleY = 0.0275 ; speed of side-to-side wave movement.
SnowAmplitude = 4.0 ; amount of side-to-side movement.
SnowVelocity = 3.0 ; speed at which snow falls
SnowPointSize = .16 ; scale the size of snow particles.
SnowMaxPointSize = 10.0 ; maximum pixel size of point sprite particles (min-spec requires <= 64).
SnowMinPointSize = 0.0 ; minimum pixel size of point sprite particles.

;Some video cards can't do hardware accelerated particles. Set this
;setting to "no" in order see what emulation will look like. Use the
;SnowQuadSize setting to make it look similar to PointSprite version.

SnowPointSprites = yes ;set to "no" for point-sprite emulation.
SnowQuadSize = 0.5 ;scale the size of snow particles when using point-sprite emulation.
End

Note that all text following a semicolon (;) on each line is a comment. EA has left some helpful comments in this code which should help explain what each item does. (For reference, this code was copied from the map "Bitter Winter")

Simply pasting the above code into your map.ini or solo.ini file should be enough to add snow to your map. You can also, however, change the settings to your liking to achieve the effect you desire.

Tip: You can change the SnowTexture setting to be either ExSnowFlake.tga or ExSnowFlake1.tga depending on how think or deep you want your snowstorm to look.

Adding Rain to Your Map

The process of adding ran to your map is highly similar to that of adding snow: you basically use a modified version of the snow code, with a different "SnowTexture" setting. Here's an example Weather block that will add rain to your map:
Weather
SnowEnabled = yes ;enable/disable snow on the map.
SnowTexture = EXRainDrop.tga ;texture used for each snow particle.

SnowBoxDimensions = 100 ;width/height of box around camera containing snow.
SnowBoxDensity = 1 ;amount of snow particles per world-unit. Raise to increase particle count.

SnowFrequencyScaleX = 1 ;speed of side-to-side wave movement.
SnowFrequencyScaleY = 1 ;speed of side-to-side wave movement.

SnowAmplitude = .1 ;amount of side-to-side movement.
SnowVelocity = 25.0 ;speed at which snow falls
SnowPointSize = .3 ;scale the size of snow particles.

;Some video cards can't do hardware accelerated particles. Set this
;setting to "no" in order see what emulation will look like. Use the
;SnowQuadSize setting to make it look similar to PointSprite version.;;;

SnowPointSprites = yes ;set to "no" for point-sprite emulation.
SnowQuadSize = .1 ;scale the size of snow particles when using point-sprite emulation.
End

Note that the raindrop texture EXRainDrop.tga is used. (For reference, this code was taken from the "Eastern Everglade" map.ini file.)

If you're adding rain, you'll likely want too have the sound of rain accompanying it, as well as periodic lightning flashes. To do this, you need to add a few scripts to your map.

First, go to the teams list and add a new team called "Rain".

Next we'll begin adding the necessary scripts. The following instructions assume some basic familiarity with World Builder. Alternatively, you can just download World Builder Rain Effects Scripts file and import it into your map in World Builder.

Begin editing the map's scripts by going through the [Edit > Scripts...] menu. Perform the following steps:
Create a folder called "Rain" under the "Rain" main directory and have the "Group is Active" check box ticked.
Create the following scripts:
Constantly Raining
*** IF ***
True.
*** THEN ***
Play Sound 'RainStereoLoop'.
Play Sound 'ThunderAmbienceStereo'.
Sound 'RainStereoLoop' play at 200.00% of full volume.
Sound 'ThunderAmbienceStereo' play at 200.00% of full volume.
Sound 'ThunderStrikesStereo' play at 200.00% of full volume.
Start Lightning
*** IF ***
True.
*** THEN ***
Set timer 'Lightning' to expire between 10.00 and 20.00 seconds.
Enable Script 'Time Between Lightning'.
Reset Lightning
*** IF ***
True.
*** THEN ***
Set timer 'Lightning' to expire between 15.00 and 30.00 seconds.
Enable Script 'Time Between Lightning'.
Time Between Lightning
*** IF ***
Timer 'Lightning' has expired.
*** THEN ***
Set timer 'Flash_Times' to expire between 0 and 4 frames.
Stop timer 'Flash_Times'
Set timer 'Between_Flash_Times' to expire between 0 and 6 frames.
Enable Script 'Reset Lightning'.
Lightning
*** IF ***
Timer 'Between_Flash_Times' has expired.
*AND* Counter 'Flash_Times' IS Greater Than 0
*** THEN ***
Fade (0-1) from 0.60 to 0.00 adding toward white. Take 1 frames to increase, hold for 2 fames, and decrease 2 frames.
Set timer 'Between_Flash_Times' to expire between 0 and 5 frames.
Subtract 1 from counter 'Flash_Times'
Play Sound 'ThunderStrikesStereo'.
» All the scripts are to be set as "Script is Active"
» "Start Lightning", "Reset Lightning" and "Time Between Lightning" are set as "Deactivate upon Success"
» All check boxes for the [Active in] "Hard", "Medium" and "Easy" are checked

Preview Image
scripts
Post comment Comments
TheUnabridgedGamer
TheUnabridgedGamer Jan 11 2012, 8:00pm says:

Why is this here? This isn't dead space related.

-2 votes     reply to comment
BabyMoseN
BabyMoseN Jan 12 2012, 12:14pm replied:

It's obviously a mistake, so calm down for goodnes sake.. No need to spam about it everywhere!

+1 vote     reply to comment
AFM-RAYAN
AFM-RAYAN Jan 12 2012, 10:13am says:

Sorry I was wrong...

+2 votes     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
C&C Generals: Zero Hour Icon
Platform
Windows
Developed By
AFM-RAYAN
Contact
Send Message
Release Date
TBD
Mod Watch
Track this mod
Download
Browse
Downloads
Add Download
Members only
Report Abuse
Report download
MD5 Hash
f1b4ca23798b73c8d34147afb7a198d9
Related Mods
Final Battle (C&C Generals: Zero Hour)
Final Battle C&C Generals: Zero Hour - Single & Multiplayer Real Time Strategy
Related Games
C&C Generals: Zero Hour
C&C Generals: Zero Hour Single & Multiplayer Real Time Strategy