PDA

View Full Version : Topolka Dam and Beyond



Clayman
Sep 2 2009, 01:32
Ever asked yourself what's the purpose of a dam that does..... nothing?
Don't want to see dirty coal powerplants anymore and looking for nice, clean power?


Then this might help a little bit:

Topolka Dam with animated water effects, sound and funky lights!
http://clayman.kilu.de/images/img/ArmAII/Staudamm_10_small.jpg (http://clayman.kilu.de/images/img/ArmAII/Staudamm_10.jpg)http://clayman.kilu.de/images/img/ArmAII/Staudamm_16_small.jpg (http://clayman.kilu.de/images/img/ArmAII/Staudamm_16.jpg)


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




Addon Version

Required Addons:

Comunity Base Addons (http://www.armaholic.com/page.php?id=6231)




Usage:
The script automaticly checks if the player or a camera object is near the dam. So normally you don't have to do anything.
However, there are several global variables to modify different parameters of the effects.


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 (http://community.bistudio.com/wiki/setLightColor), setLightAmbient (http://community.bistudio.com/wiki/setLightAmbient) and setLightBrightness (http://community.bistudio.com/wiki/setLightBrightness) commands.
e.g.

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


To check if the script has initialized (for whatever you might need this) check the variable
CLAY_TopolkaDam_initDone
e.g.

waitUntil {!(isNil "CLAY_TopolkaDam_initDone")};
waitUntil {CLAY_TopolkaDam_initDone};
Hint "WOW! Look at those awesome effects!";



Download (Addon Version): CLAY_TopolkaDamFXv12.rar (http://clayman.kilu.de/Games/ArmAII/Addons/CLAY_TopolkaDamFXv12.rar)
Armaholic.com Mirror (http://www.armaholic.com/page.php?id=7217)
ArmA2Base.de Mirror (http://arma2base.de/include.php?path=download&contentid=732)






Script Version

Required Addons:

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




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 included 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 (http://community.bistudio.com/wiki/setLightColor), setLightAmbient (http://community.bistudio.com/wiki/setLightAmbient) and setLightBrightness (http://community.bistudio.com/wiki/setLightBrightness) commands.
e.g.

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



Download (Script Version): CLAY_TopolkaDamEffects.Chernarus.rar (http://clayman.kilu.de/Games/ArmAII/Addons/CLAY_TopolkaDamEffects.Chernarus.rar)
Armaholic Mirror (http://www.armaholic.com/page.php?id=7218)
Assault Mission Studio Mirror (http://www.assaultmissionstudio.de/downloads.php?page_id=233)
ArmA2Base.de Mirror (http://arma2base.de/include.php?path=download&contentid=733)






Known Bugs:

Overlaping water tiles sometimes look weird
The end of the river looks quite provisional (well, it IS provisional^^) because the terrain isn't suited for anything better


NOTE: Make sure to either use only the Addon Version OR the Script Version.
Using both at the same time will most likely cause problems.



To do:

Add waves moving away from the waterfall(s)
Probably some other stuff I can't remember at the moment






Change Log:
V1.2

Bugs fixed

V1.1

Fixed placement of some rocks
MAP_EU no longer required for Addon Version
Self-initialising scripts (Addon Version)
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






More Screens:
http://clayman.kilu.de/images/img/ArmAII/Staudamm_5.jpg
http://clayman.kilu.de/images/img/ArmAII/Staudamm_6.jpg
http://clayman.kilu.de/images/img/ArmAII/Staudamm_7.jpg
http://clayman.kilu.de/images/img/ArmAII/Staudamm_8.jpg
http://clayman.kilu.de/images/img/ArmAII/Staudamm_9.jpg
http://clayman.kilu.de/images/img/ArmAII/Staudamm_11.jpg
http://clayman.kilu.de/images/img/ArmAII/Staudamm_12.jpg
http://clayman.kilu.de/images/img/ArmAII/Staudamm_13.jpg
http://clayman.kilu.de/images/img/ArmAII/Staudamm_14.jpg
http://clayman.kilu.de/images/img/ArmAII/Staudamm_15.jpg
http://clayman.kilu.de/images/img/ArmAII/Staudamm_17.jpg
http://clayman.kilu.de/images/img/ArmAII/Staudamm_18.jpg


Have fun!

Greetz,
Clayman

Mr Burns
Sep 2 2009, 02:22
ArmAmazing addon! Love the funky lights :thumb_down:


PS: I take the EU is needed for the water tiles, would´nt it be possible to define those in the addon versions config also?

Binkowski
Sep 2 2009, 03:12
Amazing! Adds immersion, love it. Downloading now!

MCPXXL
Sep 2 2009, 05:28
Cool thing THX a lot

nikita320106
Sep 2 2009, 05:37
another one amazing and OMG here)
thanx) very interesting)

Rellikki
Sep 2 2009, 05:39
Looks very nice, but I think the little water fall looks kinda "linear". Perhaps you could try randomizing the particle sizes a bit there to make it look more natural? Otherwise a nice idea. Adds immersion, indeed. :)

vasmkd
Sep 2 2009, 05:40
Looks great, gives it a good look.

Now all we need is some fishing rods in the game and some carp or trout in the water:D

cm
Sep 2 2009, 06:06
awesome! Downloading now!

EDIT:

btw if the dam was releasing that much water it would be depleted pretty quicky lol.

Deadfast
Sep 2 2009, 06:52
Find out how to delete lightpoints



Just use the usual deleteVehicle :)

armatech
Sep 2 2009, 09:14
Hi i edited your code to add new fill and empty animations to the water and added a new command line to stop the rocks vanishing on exit
Init.sqf


waituntil {vehicle player == player};
// Example init.sqf with optional parameters
/************************************************** ******************************
[
// Enable lights? (true / false)
true,
[
// Color of nightlights (R,G,B) for all 3 gates.
[1,0,0],[0,1,0],[0,0,1]
],
// Gate1 open? (true / false)
true,
// Gate2 open? (true / false)
true,
// Gate3 open? (true / false)
true,
// Remove Rocks on exit? (true / false)
false
] execVM "CLAY_TopolkaDamEffects.sqf";
************************************************** ******************************/
while{true}do
{
// Clay Dam Effect
CLAY_TopolkaDamFX = true;
sleep 1;
//Open Gate 1-2
CLAY_TopolkaDam_gate1 = true;
CLAY_TopolkaDam_gate2 = true;
CLAY_TopolkaDam_gate3 = false;
sleep 1;
//Open Gate 1-3
CLAY_TopolkaDam_gate1 = true;
CLAY_TopolkaDam_gate2 = true;
CLAY_TopolkaDam_gate3 = true;
//sleep for cycle
sleep 55;
//Start ending effects
CLAY_TopolkaDamFX = false;
//Wait 20sec to restart
sleep 20
};

CLAY_TopolkaDamEffects.sqf

/************************************************** *******************
***
*** Title: Topolka Dam Effects
***
***
*** Description: Creates water and sound effects aswell as a
*** small river with rapids at the Topolka Dam.
***
***
*** Author: Clayman <worldofclay@gmx.de>
*** Edited: ArMaTeC <armatec0@gmail.com>
*** Version: 1.01
***
************************************************** ********************/
CLAY_TopolkaDamFX = true;
CLAY_TopolkaDam_Waterfall = false;
CLAY_TopolkaDam_RemoveRocks = false;
if(isnil "CLAY_TopolkaDam_RocksRemoved")then
{
CLAY_TopolkaDam_RocksRemoved = true;
};
_light1 = Objnull;
_light2 = Objnull;
_light3 = Objnull;
CLAY_TopolkaDam_Water1 = "MAP_pond_big_01" createVehicleLocal [0,0,0];
CLAY_TopolkaDam_Water1 setPosASL [10315.187,3607.5203,34];
_water2 = "MAP_pond_big_01" createVehicleLocal [0,0,0];
_water3 = "MAP_pond_big_01" createVehicleLocal [0,0,0];
_water4 = "MAP_pond_big_28_03" createVehicleLocal [0,0,0];
_water5 = "MAP_pond_big_28_01" createVehicleLocal [0,0,0];
//Spawn water move effect
[_water2,_water3,_water4,_water5] spawn
{
private ["_water2","_water3","_water4","_water5"];
_water2 = _this select 0;
_water3 = _this select 1;
_water4 = _this select 2;
_water5 = _this select 3;
_i = 34;
while {_i < 37.4}do
{
CLAY_TopolkaDam_Water1 setPosASL [10315.187,3607.5203,_i];
_i = _i + 0.02;
sleep 0.1;
};
_i = 34;
CLAY_TopolkaDam_Waterfall = true;
while {_i < 36}do
{
_water2 setPosASL [10316.801,3538.1584,_i];
_water3 setPosASL [10313.91,3470.2805,_i];
_water4 setPosASL [10301.494,3397.4358,_i];
_water5 setPosASL [10306.504,3422.1577,_i];
_i = _i + 0.01;
sleep 0.1;
};
};
if(CLAY_TopolkaDam_RocksRemoved)then
{
_rock1 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock1 setPosASL [10309.365,3398.7043,5.885242];
_rock2 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock2 setPosASL [10289.212,3400.3198,12.0457];
_rock3 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock3 setPosASL [10294.988,3397.6316,5.743645];
_rock4 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock4 setPosASL [10306.603,3397.3662,8.251797];
_rock5 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock5 setPosASL [10300.585,3396.4177,10.969398];
_rock6 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock6 setPosASL [10304.021,3396.481,10.587006];
_rock7 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock7 setPosASL [10297.084,3397.292,7.810661];
_rock8 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock8 setPosASL [10290.266,3400.9587,12.590393];
_rock9 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock9 setPosASL [10323.604,3570.0215,6.65696];
_rock10 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock10 setPosASL [10321.345, 3569.9382, -27.352427];
_rock11 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock11 setPosASL [10317.97, 3569.7937, -29.222584];
_rock12 = "MAP_R2_Rock1" createVehicleLocal [0,0,0];
_rock12 setPosASL [10311.617, 3569.7961, -25.606192];
_rock10 setDir 179.06169;
_rock11 setDir 151.61021;
_boulder1 = "MAP_R2_Boulder1" createVehicleLocal [0,0,0];
_boulder1 setPosASL [10324.289,3568.2805,37.209103];
_boulder2 = "MAP_R2_Boulder1" createVehicleLocal [0,0,0];
_boulder2 setPosASL [10322.435,3567.0767,37.786861];
_boulder3 = "MAP_R2_Boulder1" createVehicleLocal [0,0,0];
_boulder3 setPosASL [10306.476,3569.1716,37.904892];
_boulder4 = "MAP_R2_Boulder1" createVehicleLocal [0,0,0];
_boulder4 setPosASL [10307.284,3567.6069,36.230499];
_boulder5 = "MAP_R2_Boulder1" createVehicleLocal [0,0,0];
_boulder5 setPosASL [10307.619,3569.6309,38.609241];
};
private ["_lights", "_col1", "_col2", "_col3"];
If (count _this == 6) Then
{
CLAY_TopolkaDam_RemoveRocks = _this select 5;
};
If (count _this > 4) Then
{
_lights = _this select 0;
_colors = _this select 1;
If (count _colors == 3) Then
{
If (count (_colors select 0) == 3) Then
{
_col1 = _colors select 0;
}else{
_col1 = [1,0,0];
};
If (count (_colors select 1) == 3) Then
{
_col2 = _colors select 1;
}else{
_col2 = [0,1,0];
};
If (count (_colors select 2) == 3) Then
{
_col3 = _colors select 2;
}else{
_col3 = [0,0,1];
};
}else{
_col1 = [1,0,0];
_col2 = [0,1,0];
_col3 = [0,0,1];
};
CLAY_TopolkaDam_gate1 = _this select 2;
CLAY_TopolkaDam_gate2 = _this select 3;
CLAY_TopolkaDam_gate3 = _this select 4;
}else{
_lights = true;
_col1 = [1,0,0];
_col2 = [0,1,0];
_col3 = [0,0,1];
CLAY_TopolkaDam_gate1 = true;
CLAY_TopolkaDam_gate2 = true;
CLAY_TopolkaDam_gate3 = true;
};
If (_lights && (isNil "CLAY_TopolkaDamLights")) Then
{
_light1 = "#lightpoint" createVehicleLocal [10309.4,3620,5.5];
_light1 setLightBrightness 0.1;
_light1 setLightColor _col1;
_light1 setLightAmbient _col1;
_light2 = "#lightpoint" createVehicleLocal [10315.5,3620,5.5];
_light2 setLightBrightness 0.1;
_light2 setLightColor _col2;
_light2 setLightAmbient _col2;
_light3 = "#lightpoint" createVehicleLocal [10321.9,3620,5.5];
_light3 setLightBrightness 0.1;
_light3 setLightColor _col3;
_light3 setLightAmbient _col3;
// Fix to avoid multiple lights being created
CLAY_TopolkaDamLights = 1;
};
_i = 1;
CLAY_TopolkaDam_Water1 say "CLAY_WaterfallFX";
while {CLAY_TopolkaDamFX} do
{
If (time > (16.5 * _i)) Then {_i = _i + 1; CLAY_TopolkaDam_Water1 say "CLAY_WaterfallFX"};
If (CLAY_TopolkaDam_gate1) Then
{
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [10309.4,3620,5.5], [0, -10, 0], 1, 100, 0.1, 0.1, [5, 10], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", ""];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [10310.4,3620,5.5], [0, -10, 0], 1, 100, 0.1, 0.1, [5, 10], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", ""];
drop ["\Ca\Data\cl_basic", "", "Billboard", 3, 3, [10309.4,3607,1], [0,0,0], 1, 0.25, 0.2, 0.001, [10,12], [[1,1,1,0.8],[1,1,1,0.4],[1,1,1,0.2],[1,1,1,0.2],[1,1,1,0.1],[1,1,1,0.1],[1,1,1,0]], [0], 0.1, 0.8, "", "", ""];
drop ["\Ca\Data\cl_basic", "", "Billboard", 3, 3, [10310.4,3607,1], [0,0,0], 1, 0.25, 0.2, 0.001, [10,12], [[1,1,1,0.8],[1,1,1,0.4],[1,1,1,0.2],[1,1,1,0.2],[1,1,1,0.1],[1,1,1,0.1],[1,1,1,0]], [0], 0.1, 0.8, "", "", ""];
};
If (CLAY_TopolkaDam_gate2) Then
{
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [10314.5,3620,5.5], [0, -10, 0], 1, 100, 0.1, 0.1, [5, 10], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", ""];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [10315.5,3620,5.5], [0, -10, 0], 1, 100, 0.1, 0.1, [5, 10], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", ""];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [10316.5,3620,5.5], [0, -10, 0], 1, 100, 0.1, 0.1, [5, 10], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", ""];
drop ["\Ca\Data\cl_basic", "", "Billboard", 3, 3, [10314.5,3607,1], [0,0,0], 1, 0.25, 0.2, 0.001, [10,12], [[1,1,1,0.8],[1,1,1,0.4],[1,1,1,0.2],[1,1,1,0.2],[1,1,1,0.1],[1,1,1,0.1],[1,1,1,0]], [0], 0.1, 0.8, "", "", ""];
drop ["\Ca\Data\cl_basic", "", "Billboard", 3, 3, [10315.5,3607,1], [0,0,0], 1, 0.25, 0.2, 0.001, [10,12], [[1,1,1,0.8],[1,1,1,0.4],[1,1,1,0.2],[1,1,1,0.2],[1,1,1,0.1],[1,1,1,0.1],[1,1,1,0]], [0], 0.1, 0.8, "", "", ""];
drop ["\Ca\Data\cl_basic", "", "Billboard", 3, 3, [10316.5,3607,1], [0,0,0], 1, 0.25, 0.2, 0.001, [10,12], [[1,1,1,0.8],[1,1,1,0.4],[1,1,1,0.2],[1,1,1,0.2],[1,1,1,0.1],[1,1,1,0.1],[1,1,1,0]], [0], 0.1, 0.8, "", "", ""];
};
If (CLAY_TopolkaDam_gate3) Then
{
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [10320.9,3620,5.5], [0, -10, 0], 1, 100, 0.1, 0.1, [5, 10], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", ""];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [10321.9,3620,5.5], [0, -10, 0], 1, 100, 0.1, 0.1, [5, 10], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", ""];
drop ["\Ca\Data\cl_basic", "", "Billboard", 3, 3, [10320.9,3607,1], [0,0,0], 1, 0.25, 0.2, 0.001, [10,12], [[1,1,1,0.8],[1,1,1,0.4],[1,1,1,0.2],[1,1,1,0.2],[1,1,1,0.1],[1,1,1,0.1],[1,1,1,0]], [0], 0.1, 0.8, "", "", ""];
drop ["\Ca\Data\cl_basic", "", "Billboard", 3, 3, [10321.9,3607,1], [0,0,0], 1, 0.25, 0.2, 0.001, [10,12], [[1,1,1,0.8],[1,1,1,0.4],[1,1,1,0.2],[1,1,1,0.2],[1,1,1,0.1],[1,1,1,0.1],[1,1,1,0]], [0], 0.1, 0.8, "", "", ""];
};
if(CLAY_TopolkaDam_Waterfall)then{
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [-6, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [-5, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [-4, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [-3, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [-2, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [-1, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [0, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [1, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
};
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [2, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [3, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [4, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [5, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
sleep 0.1;
};
_i = 37.4;
while {_i > 36}do
{
CLAY_TopolkaDam_Water1 setPosASL [10315.187,3607.5203,_i];
_i = _i - 0.02;
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [2, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [3, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [4, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
drop ["\Ca\Data\cl_water", "", "Billboard", 1.3, 1.3, [5, -38, -0.5], [0, -5, 0], 1, 100, 0.1, 0.1, [2, 4], [[1,1,1,0.9]], [0], 0.1, 0.01, "", "", CLAY_TopolkaDam_Water1];
sleep 0.1;
};
_i = 36;
CLAY_TopolkaDam_Waterfall = false;
while {_i > 34}do
{
_water2 setPosASL [10316.801,3538.1584,_i];
_water3 setPosASL [10313.91,3470.2805,_i];
_water4 setPosASL [10301.494,3397.4358,_i];
_water5 setPosASL [10306.504,3422.1577,_i];
CLAY_TopolkaDam_Water1 setPosASL [10315.187,3607.5203,_i];
_i = _i - 0.01;
sleep 0.1;
};
deleteVehicle CLAY_TopolkaDam_Water1;
deleteVehicle _water2;
deleteVehicle _water3;
deleteVehicle _water4;
deleteVehicle _water5;
if(CLAY_TopolkaDam_RemoveRocks)then
{
CLAY_TopolkaDam_RocksRemoved = true;
deleteVehicle _rock1;
deleteVehicle _rock2;
deleteVehicle _rock3;
deleteVehicle _rock4;
deleteVehicle _rock5;
deleteVehicle _rock6;
deleteVehicle _rock7;
deleteVehicle _rock8;
deleteVehicle _rock9;
deleteVehicle _rock10;
deleteVehicle _rock11;
deleteVehicle _rock12;
deleteVehicle _boulder1;
deleteVehicle _boulder2;
deleteVehicle _boulder3;
deleteVehicle _boulder4;
deleteVehicle _boulder5;
};
deleteVehicle _light1;
deleteVehicle _light2;
deleteVehicle _light3;

Clayman
Sep 2 2009, 09:29
Thanks for all the comments. Glad you like it. :)



PS: I take the EU is needed for the water tiles, would´nt it be possible to define those in the addon versions config also?
Yes, you're right. Why didn't I come up with that myself?^^
Going to add it in the next version.



Looks very nice, but I think the little water fall looks kinda "linear". Perhaps you could try randomizing the particle sizes a bit there to make it look more natural? Otherwise a nice idea. Adds immersion, indeed. :)
Good idea. Will give it a try. Thanks.



Just use the usual deleteVehicle :)
Already tried that, but it doesn't work.


Edit:

Hi i edited your code to add new fill and empty animations to the water and added a new command line to stop the rocks vanishing on exit
Thanks armatech. Looks interesting. Will tank a closer look later when I get home from work.

luckyhendrix
Sep 2 2009, 09:51
Great I love this addon, does this mean it's possible to create a real river system to chernarus ? because a country without rivers ....

MehMan
Sep 2 2009, 10:31
Can anybody youtube this?

Clayman
Sep 2 2009, 10:46
Early WiP video. I'll make a new one later (if noone else does^^).
N0jMpsX6QSc

TheHandsy
Sep 2 2009, 11:10
^ Curse you! I was just making one. Haha, I'll still put it up anyway, my channel needs a new video. =P

Flarmapoint 2
Sep 2 2009, 11:39
wow this looks amazing!

is there anyway of just puting the addon in a mod folder, to activate it? im no good with all (init) scripting in the editor lol

Scrub
Sep 2 2009, 11:45
Very awesome indeed. Thank you for this, the world is even more rich.



btw if the dam was releasing that much water it would be depleted pretty quicky lol.

(It's supplied by a humongous artisian spring, the secret source of this regions fresh water, lol)

TheHandsy
Sep 2 2009, 12:54
Okay, here's my video of it.
http://www.youtube.com/watch?v=g1NLFi4ybrM

Sorry for the clicking sounds if they do occur. I think it's because I spilt the clips and didn't put the main dam sound over them all. I would have if I knew how to convert a .WSS to something else.

Deadfast
Sep 2 2009, 14:05
Already tried that, but it doesn't work.


Finally got home and had the time to look on the script :)


The reason why you can't delete the lightpoints is because they are undefined in the scope you're trying to delete them (local variables only exist for the scope where they are created and its children).


Put this on top of the IF where you create them (line 119):


private ["_light1", "_light2", "_light3"];





Okay, here's my video of it.
http://www.youtube.com/watch?v=g1NLFi4ybrM


You should use showCinemaBorder false to get rid of the annoying black frame on top and bottom of the screen :)

TimeDeatH
Sep 2 2009, 14:17
Now we just need to be able to blow it up and have flood animations...lol.

TheHandsy
Sep 2 2009, 14:56
You should use showCinemaBorder false to get rid of the annoying black frame on top and bottom of the screen :)

I did, but for some reason that code no long works for me. Goes for the briefing.sqf too...

Manzilla
Sep 2 2009, 15:19
Damn this is bad ass. Well done.

alext223
Sep 2 2009, 16:14
Nice pice of kit mate! Now if only we could blow it up and get the wave.

Uziyahu--IDF
Sep 2 2009, 21:23
Maybe the dam has a spring on the other side?

Add particles of white-water moving away from the dam, at least for a little distance beyond the "rapids". Doesn't have to be anything too fancy, just something to add the sensation of motion of the water.

Clayman
Sep 2 2009, 22:16
The reason why you can't delete the lightpoints is because they are undefined in the scope you're trying to delete them (local variables only exist for the scope where they are created and its children).
Oops. Thanks Deadfast.
Never understood the meaning of this scope part, but now I think I get it. :D



Now we just need to be able to blow it up and have flood animations...lol.
Well, If someone makes a destroyable dam then I'll try to make a flood wave. ;)



Add particles of white-water moving away from the dam, at least for a little distance beyond the "rapids". Doesn't have to be anything too fancy, just something to add the sensation of motion of the water.
Been trying to add something like that, but couldn't get it to look right yet.
But I'll keep it in mind.

Rogue_Trooper
Sep 2 2009, 22:23
Top notch work.

TimeDeatH
Sep 3 2009, 12:11
Well, If someone makes a destroyable dam then I'll try to make a flood wave. ;)


Well I'm sure it wouldn't be that hard considering regular buildings are destructible, but you would need a different animation (or more dust so you can't see the crappy animation they already have) than sinking into the ground, actually I think someone should make a mod where buildings and water towers have a better animation when they get destroyed.

zGuba
Sep 3 2009, 19:13
Hmmm, isn't it possible to create this without using Mapfact EU? And what about using (cameraPositionToWorld [0,0,0]) distance _damPosition - even more effective, since player won't have to be close to the dam, just camera beign nearby should trigger the dam.

An XEH compatible self-initialising config:


class CfgPatches {
class CLAY_TopolkaDamFX {
units[] = {};
weapons[] = {};
requiredAddons[] = {"Extended_EventHandlers"};
requiredVersion = 1.02;
version = 2009-09-03;
};
};

class Extended_PostInit_EventHandlers {
CLAY_TopolkaDamFX = "[] spawn compile preprocessFileLineNumbers '\CLAY_TopolkaDamFX\init.sqf';";
};

...

sorry for changed filenames :)

Blueteamguy
Sep 4 2009, 20:56
awesome! thinking about doing Pobeda dam? many of my "on the run" sequences in private missions use this as a border. It would be awesome/hilarious to see cop boats just looking like "how are going 2 get past THAT???"

Clayman
Sep 8 2009, 23:28
And what about using (cameraPositionToWorld [0,0,0]) distance _damPosition
Dam(n), it just took me about two hours to find out that it's positionCameraToWorld and not cameraPositionToWorld. LOL!
:p :D


thinking about doing Pobeda dam?
Would like to do so, but the problem is that the terrain below the Pobeda Dam isn't suited for anything like a river or lake.
It would require a lot of terrain editing. On the other hand, it would be cool if there would be a river from the Pobeda Dam to the Guba Bay / ocean. ;)
But that's far beyond my skills.^^

JohnnyBoy
Sep 9 2009, 05:02
Love the effects. Especially the mist. Thanks for the great work!

mrcash2009
Sep 9 2009, 07:58
Would this ever be a simple addon pbo version in the end?

Its great but a shame its dependant on a few things and needs scripting :)

Seems like a keeper feature that should be an addon to me, great work though.

Clayman
Sep 9 2009, 22:06
http://clayman.kilu.de/images/img/ArmAII/Bunny1_small.jpg (http://clayman.kilu.de/images/img/ArmAII/Bunny1.jpg)
http://clayman.kilu.de/images/img/ArmAII/Wheelie1_small.jpg (http://clayman.kilu.de/images/img/ArmAII/Wheelie1.jpg)

First of all, many thanks to all the feedback and the good suggestions (especially to Deadfast, armatech and zGuba). I tried to add as many of the ideas as possible.
In detail the new version 1.1 of the Topolka Dam FX contains the following new / changed features:

- Addon version doesn't require MAP_EU anymore as requested by several people. Instead CBA is required now.
- Addons version will self-initialise (will add the effects to any existing mission)
- New sound for main waterfall
- Added sound to the small waterfall / rapids
- Main waterfall sound only played when at least one gate is open
- Added vertical movement to the river to simulate waves
- Randomised particles from small waterfall / rapids
- Light parameters can be changed at any time
- Fixed placement of some rocks
- Lights will be removed when script ends

Despite my non-existant knowledge of MP editing I've included .bisign and key files. However, I have no idea if this works in MP at all. Any feedback on this is appreciated.

Further information and DL links can be found in first post.

MEDICUS
Sep 9 2009, 22:09
Very cool, Clayman!
Thx a lot for this one! Will test it asap :)

Keep it up!
MfG, Medicus

Binkowski
Sep 10 2009, 04:01
Awesome, thanks for the update!

BCA Cat Toaster
Sep 10 2009, 08:48
Strange enough it seems to work in MP ;-). I put the key on our server and joined with the Addon using my AAS-Mission Total Annihilation which has a spawn-point near the dam. The following message appears: "Cannot load texture map_eu\icon\icon.paa."

After clicking OK it seems to work anyway but it´s a bit irritating. Looks and sounds awesome by the way! The reason why i said "strange" is, that other players without that Addon of course don´t see it and don´t have that river. They can just pass the area while i have to move my tank or whatever around the river-area now ;-). That´s of course not your problem, I´m just wondering that something like this is possible at all, but it is! Great job anyway. Any chance to get rid of that error-message?

Clayman
Sep 10 2009, 14:10
Oops. I forgot to remove the icon entry I used for testing from the config. It's fixed now. Please re-download.
Good to know it works in MP. :)

MEDICUS
Sep 10 2009, 16:47
Just wondering if you updated the scriptversion, too. Tested it and still have the sound-issue if all gates are closed.

MfG, Medicus

Clayman
Sep 10 2009, 19:47
Actually the script version is updated, too.

Are you sure it's not the sound of the small waterfall you're hearing?

Or just another thought, do you have the addon version active while testing the script version? This might cause problems, as the global variables of both versions are the same. Never tested it tbh.
(Note to myself: Maybe I should change that in next version...)

Miller
Sep 10 2009, 20:55
Thanks Clayman :smile_o:

ArmA2Base.de Mirror updated:

Topolka Dam and Beyond (Addon) v1.1 by Clayman (http://arma2base.de/include.php?path=download&contentid=732)

Topolka Dam and Beyond (Script) v1.1 by Clayman (http://arma2base.de/include.php?path=download&contentid=733)

Kind regards
Miller

BCA Cat Toaster
Sep 10 2009, 21:17
thx Clayman, that was a fast fix! Any plans for a "Pobeda Dam"-Version of this Addon?

zGuba
Sep 10 2009, 22:22
Thanks for new version!

Another tip: You can use double while script to check for camera beign close instead of using triggers in "PostInited" script ;)


while {true} do {
while {true} do {
if (~~ && ~~) then {~~~~} else {~~~~};
sleep ~;
};
};

Concerning FX: single while loop has limit of 1000 loops, so for Your dam FX it would be wise to make it last longer by inserting one loop into another using the same condition - current one will stop after approx. 100 seconds.

There's also another thing that could be useful - Community Modding Bible (http://dev-heaven.net/repositories/changes/cmb/configs/A2/formatted/cfgAmmoMagWepVeh.cpp). Try searching for objects that are already configured by developers.

Overall - awesome job!

Inkompetent
Sep 11 2009, 17:07
Correction: Limit to a while is 10.000 loops. But in fast loops that still won't last a long mission ^^

Clayman
Sep 11 2009, 18:50
@miller
Thanks. Links added to first post.



thx Clayman, that was a fast fix! Any plans for a "Pobeda Dam"-Version of this Addon?


Would like to do so, but the problem is that the terrain below the Pobeda Dam isn't suited for anything like a river or lake.
It would require a lot of terrain editing. On the other hand, it would be cool if there would be a river from the Pobeda Dam to the Guba Bay / ocean. ;)
But that's far beyond my skills.^^
Just adding the water effect itself would be no problem, but it would look pretty weird without any river below the dam. ;)


@zGuba
Thanks for the input. Will keep it in mind for the next update. :)
The link you posted asks me for username and password. I suppose it's time for me to register over at devheaven.^^

kju
Dec 7 2009, 08:11
As always very nice job Clayman. :)

We are getting some issues in MP though, if not everyone has it.
I think the problems are:

1) Missing units array definitions of new classes in the config:


class CfgPatches
{
class CLAY_TopolkaDamFX
{
units[] = {"CLAY_DamFXBase","CLAY_DamFXPond01","CLAY_DamFXPond02","CLAY_DamFXPond03","CLAY_DamFXRock01","CLAY_DamFXRock02"};
weapons[] = {};
requiredAddons[] = {"Extended_EventHandlers"};
requiredVersion = 1.04;
version = "2009-12-07";
};
};

2) Is that non createVehicleLocal in sound.sqf intentional?


waitUntil {!(isNil "CLAY_TopolkaDam_sound")};

while {CLAY_TopolkaDamFX} do
{
waitUntil {CLAY_TopolkaDam_sound};

_soundSource = "HeliHEmpty" createVehicleLocal [0,0,0]; // was createVehicle

Clayman
Dec 10 2009, 00:49
Hi kju.

Thanks for reporting. I have fixed both Script and Addon Version.
Hope everything will work now the way it should.


As I don't have any posibility to test this in MP (and my MP scripting knowledge is _very_ limited), feel free to inform me about any other bugs you might find so I can fix them, too. :)

PSYKO_phoenix
Jun 18 2010, 23:41
hey there im a total noob at scripting and editing, i was wondering is there a way to set it up so a player can walk over to the dam house and turn off and on the dam??

Clayman
Jun 19 2010, 16:40
Sure that's possible.

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


You could place a trigger at the house with

player addAction ["Open/Close Dam","dam.sqf"];
and a small script dam.sqf:

If (CLAY_TopolkaDam_gate1 || CLAY_TopolkaDam_gate2 || CLAY_TopolkaDam_gate3) Then
{
CLAY_TopolkaDam_gate1 = false;
CLAY_TopolkaDam_gate2 = false;
CLAY_TopolkaDam_gate3 = false;
}
Else
{
CLAY_TopolkaDam_gate1 = true;
CLAY_TopolkaDam_gate2 = true;
CLAY_TopolkaDam_gate3 = true;
};

PSYKO_phoenix
Jun 20 2010, 01:24
Sure that's possible.



You could place a trigger at the house with

player addAction ["Open/Close Dam","dam.sqf"];
and a small script dam.sqf:

If (CLAY_TopolkaDam_gate1 || CLAY_TopolkaDam_gate2 || CLAY_TopolkaDam_gate3) Then
{
CLAY_TopolkaDam_gate1 = false;
CLAY_TopolkaDam_gate2 = false;
CLAY_TopolkaDam_gate3 = false;
}
Else
{
CLAY_TopolkaDam_gate1 = true;
CLAY_TopolkaDam_gate2 = true;
CLAY_TopolkaDam_gate3 = true;
};

THANKS SO MUCH! worked like a charm, do you have one to turn the lights on and off? somthing like the post you just did that i can simply cut and paste into place? or is that asking to much?


also....

how do i get it to work for all players online? at the mo, it only works for the person who turnes it off?

Clayman
Jun 20 2010, 12:51
Pretty much the same as above:

If (CLAY_TopolkaDam_lights) Then
{
CLAY_TopolkaDam_lights = false;
}
Else
{
CLAY_TopolkaDam_lights = true;
};