UTD^Force
  • UTD^Force
  • 71.25% (Friendly)
  • Colonel Topic Starter
12 years ago
guys how can i make a water wave just like GLA mission 01 in generals??
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
Sponsor
Rrtaya_tsamsiyu
12 years ago
Your best bet would be to look at the mission itself in WorldBuilder and see how all that works, then clone what it does to your map. The map is originally contained in a .big file, which you would need finalBIG to get into.

http://www.mediafire.com/?b4ms8tln9znm2mq 

For some reason it will appear in worldbuilder, but not in-game. i think this might be due to its name, though.
one soul at a time
UTD^Force
  • UTD^Force
  • 71.25% (Friendly)
  • Colonel Topic Starter
12 years ago
i have already extracted the mission by C&C BIG extractor and didn't find out how they made it
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
i^love^mixery
12 years ago
Rrtaya_tsamsiyu
12 years ago
mix, hes not talking about waves on a beach, that sort of thing. Hes talking about the first GLA mission in vanilla Generals, where you destroy the dam and a wave of water goes through the valley destroying everything.

UTD, i'll take another look at the map myself and see if i can find how it works


Edit;
i think i've found it. Near the dam, there's an object called WaveGuideGLA01. i looked it up in the INIs [its in System.ini], and found that it does everything that you see, as far as the wave.

i couldn't find anything in the map's scripting to trigger this object though, or any script to make the wave follow the waypoint path seen going down river.

It might be that WaveGuideGLA01 is hard-coded to trigger if a nearby dam is destroyed, and to follow a path if it has exactly the right name [which is WaveGuide1, apparently]. Similar to how naming a path “Railroad” will make any nearby train follow it, without scripting it to do so. This is my best guess as to how the wave works.

One last thing, if you want to edit how the wave works, as in how fast it goes, how high it is, etc, i think you should be able to edit WaveGuideGLA01 using a map INI file. i don't know exactly how map INIs work though, so you would have to figure all that out.
one soul at a time
i^love^mixery
12 years ago
Oh.. in that case, what rrtaya said is right. Except one thing:
The first waypoint of the path needs to be named WaveGuide1, not the path itself.

Whenever a Dam is destroyed a wave will follow that waypoint path. it can even go around curves (if they are not 90°)

But you will only be able to show a small wave particle effect thingy. you will not be able to display the rising water as in the mission. i have no idea of how they achieved that.

And do not forget the WaveGuide object. Its named differently in Zero Hour but i guess what rrtaya said is right.
Rrtaya_tsamsiyu
12 years ago

you will not be able to display the rising water as in the mission. i have no idea of how they achieved that.



i might be wrong, but i think this is also done by the WaveGuideGLA01 object.
Here's some of the code for WaveGuideGLA01 from System.INI;


  Behavior = WaveGuideUpdate ModuleTag_04
    WaveDelay                  = 750    ;(in milliseconds)delay till wave starts moving
    YSize                      = 650.0  ;size in Y
    LinearWaveSpacing          = 15.0   ;linear waves get pushed up at these intervals across
    WaveBendMagnitude          = 500.0  ;shape of wave (larger # = more flat and 0 = straight line)
    WaterVelocity              = 1.0 ;2.7    ;in dist per sec, velocity to "push up" the water 
    PreferredHeight            = 35.0   ;water level we want to be after the wave
    ShorelineEffectDistance     = 5.0   ;this far behind the wave we "hit" the shores
    DamageRadius               = 25.0   ;damage things this far from us
    DamageAmount               = 99999  ;do this much damage
    ToppleForce                = 0.25   ;force strength we topple things with
    RandomSplashSound          = WaveRandomSplash
    RandomSplashSoundFrequency = 50     ;every so often a # from 1-100 is chosen, if above this number the sound will play
    BridgeParticle             = WaveHitBridge01 ;particle system when wave hits a bridge
    BridgeParticleAngleFudge   = -95.0  ;angle to offset the bridge particle angle
    LoopingSound               = DamBreakWaveLoop
  End



the PreferredHeight line makes me think that the wave creates it's own water area on the map
one soul at a time
i^love^mixery
12 years ago
I have already used that WaveGuide waves in my maps and there is no rising water. Only the particle effect of the very front wave. This also is the thing which does the damage on contact. There must be more behind it.

Or maybe you can get it to work?
Rrtaya_tsamsiyu
12 years ago
i can try. ill probably make a few versions of the map, each with an different element of the flood stuffs missing. If the water doesn't work on one of these edited maps, whatever i deleted is what i need to look at.

Edit;
Looked at it some. i cloned the mission map, including ini's, so i could test it in skirmish. The wave didn't even work without me editing stuff. i tried adding a water zone, simply named “Water” and that didn't work.

Its possible that they added hard-code just for GLA mission 01, which means the wave seen in that mission is almost impossible to replicate, unless you made a replacement for that mission with the same name maybe. And then it wouldn't be useable in skirmish mode, only useable by going into the GLA campaign. Then you wouldn't be able to play the actual GLA mission.

Its also possible that you could add a water zone with a certain name, that would work with WaveGuideGLA01, but i don't know what that name would be.

========================================================================================
i did think of one way you might be able to make a wave of sorts though, although it would require a massive amount of scripting, and trial and error. And it might make it lag really bad if it did work.

Anyways, here's my idea; you could make a bunch of water zones, all the way down the river on your map. Make a script that starts a timer when your dam is destroyed. Then, each of your water zones would rise, one after the other, triggered by your timer.

For example;
Dam destroyed = timer started, first water zone rises 20 feet in 0.5 seconds.
Timer hits 1 second, zone two rises 20 feet in 0.5 seconds.
Timer hits 2 seconds, zone three rises 20 feet in 0.5 seconds.
and on, and on, until your wave goes off map. Each of those lines would be a separate script.

If the increase in water height has just the right vertical speed [controlled by the ratio of height to rise / time it takes to rise] it could blend together to look like a wave of water.
The times at which each water zone is triggered would have to be exact as well, to stay with the particle effects made by the WaveGuideGLA01 object.

Again, all of this could end up looking very glitchy, or lag the game, or both. My hope is that the water spray from Wave guide would hide the glitchy looks of the water rising. Don't know if it would lag bad or not.

And sorry for yet another wall of text, lol.
one soul at a time
i^love^mixery
12 years ago
That solution is impossible, rrtaya. The lag would be absolutely unbearable.

There also is a note in the official generals world builder manual:

HOW TO BUILD A DAM
In a word: don’t. The dams in the single-player campaigns took a great deal of time and special coding to
create. If you would like to have the visual of a dam in your map, you can place the object, but be sure to
check that it is Indestructable and Unselectable in the Object Properties window.

Rrtaya_tsamsiyu
12 years ago
hmm, well then. Still might be interesting to have a water zone making a river below the dam, and have the river slowly rise if the dam is destroyed. No mega-waves though :/
one soul at a time