
Title: 	 Topolka Dam Effects (Script Version)

Author:  Clayman  <worldofclay@gmx.de>

Version: 1.1

Date:    09-09-2009


******************************


 Description:
Adds water and sound effects aswell as a small river with rapids to the Topolka Dam on Chernarus.


******************************


 Required Addons:

 * Mapfact Editor Upgrade V1.0 (MAP_EU.pbo)
	http://www.armaholic.com/page.php?id=6194


******************************


 Installation:
Copy the 'CLAY_TopolkaDamEffects.Chernarus' folder to your mission folder, e.g.

        \My Documents\ArmA2\missions or 
        \My Documents\ArmA2 Other Profiles\[profile name]\missions


******************************


 Usage:
Copy the 'description.ext', 'CLAY_TopolkaDamEffects.sqf', 'CLAY_TopolkaDamSound.sqf' and the folder 'sound' to your mission folder.
(NOTE: The included init.sqf is just an example. In this demo mission it does nothing. It's just to show you how to pass additional parameters to the script.)
To use the script, simply place the following code into an unit's init line, a trigger or a script:

	nil = [] execVM "CLAY_TopolkaDamEffects.sqf";


To deactivate the script and remove all created objects (river, rocks etc.) use:

	CLAY_TopolkaDamFX = false;


You can place a trigger around the Topolka Dam area, which starts the script whenever the player is near
and quits the script once he leaves the area:

	Size a/b: 500 / 800 (or whatever you want!)
	Activation: Everybody OR side of player (e.g. BLUFOR) OR group the trigger to the player // Repeat
	On Activation: nil = [] execVM "CLAY_TopolkaDamEffects.sqf";
	Deactivation: CLAY_TopolkaDamFX = false;

(See Demo mission!)



 Advanced:
You can pass several parameters to the script:

	[<enable lights? | bool>, [<nightlight color gate 1 | Array - RGB>, <nightlight color gate 2 | Array - RGB>, <nightlight color gate 3 | Array - RGB>], <1st gate open? | bool>, <2nd gate open? | bool>, <3rd gate open? | bool>] execVM ...

 enable lights? - Is the dam illuminated at night (true / false)
 nightlight color gate 1 / 2 / 3 - Color of the lights can be set for each of the three gates. If lights are not enabled you must at least pass empty arrays! Format is [R, G, B].
 1st / 2nd / 3rd gate open? - Each of the three gates can be opend / closed independently. (true / false)

examples:

	nil = [true, [[0,1,0], [0,0,1], [1,0,0]], true, true, true] execVM "CLAY_TopolkaDamEffects.sqf";

	nil = [false, [[], [], []], true, false, false] execVM "CLAY_TopolkaDamEffects.sqf";


Open / Close Gates:
To open / close any of the gates at any time in your mission set these global variables to true (open) or false (closed):

	CLAY_TopolkaDam_gate1
	CLAY_TopolkaDam_gate2
	CLAY_TopolkaDam_gate3


Turn Nightlights On / Off:
You can turn the nightlights on / off at any time during your mission by setting this global variable to true (lights on) or false (lights off):

	CLAY_TopolkaDam_lights



Change Color / Brightness of the nightlights:
The nightlight objects can be addressed via

	CLAY_TopolkaDam_light1
	CLAY_TopolkaDam_light2
	CLAY_TopolkaDam_light3

Use these with the 'setLightColor', 'setLightAmbient' and 'setLightBrightness' commands.
e.g.

	CLAY_TopolkaDam_light1 setLightBrightness 0;
	CLAY_TopolkaDam_light2 setLightColor [0,0,1];
	CLAY_TopolkaDam_light3 setLightAmbient [1,0,0];


******************************


 Known Bugs:

 * Overlaping water tiles sometimes look weird


******************************


 Disclaimer:
Use this whatsoever at your own risk. I take no responsibility for (im)possible damage 
to your game/system/health/relationship/life that may be caused by installation of this.


******************************


 Change log:

V1.1
 * Fixed placement of some rocks
 * New sound for main waterfall
 * Main waterfall sound only played when at least one gate is open
 * Added sound to rapids
 * Water on rapids more random (more natural look)
 * Added vertical movement to river to simulate waves
 * Lights have global names to access them in the editor / other scripts
 * Turn lights on / off at any time
 * Lights will be deleted at end of script

V1.0
 * Initial release
