# Set Water State

Grammar — Change water to waterState|State over duration seconds, using a blendType|Type blend curve
FlagsNative | Action

Changes the water state on a map. This causes a water template to shift between its different pre-determined settings.

# Arguments

  • string [ water ] — Water State
  • fixed — Duration
  • int [ preset::WaterBlendType ] — Blend Type

Returns — void

native void WaterSetState(
	string inWater,
	fixed inDuration,
	int inMorphType,
);

Category: Environment / Terrain And Water

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L641
WaterSetState("Template 1|[Default]", 4.0, c_wtcLinear)
// L2790
WaterSetState("Template 1|Alternate Setting 1", 15.0, c_wtcLinear)
// L2871
WaterSetState("Template 1|Alternate Setting 2", 4.0, c_wtcLinear)
// L2913
WaterSetState("Template 1|[Default]", 10.0, c_wtcLinear)
// L4857
WaterSetState("Template 1|Alternate Setting 1", (SoundLengthSync(SoundLink("TTosh01BriefingTosh00001", 0)) + 0.0), c_wtcLinear)
// L4862
WaterSetState("Template 1|Alternate Setting 2", 6.0, c_wtcLinear)
// L4889
WaterSetState("Template 1|[Default]", 1.0, c_wtcLinear)
// L5035
WaterSetState("Template 1|[Default]", 1.0, c_wtcLinear)
// L5240
WaterSetState("Template 1|Alternate Setting 2", 6.0, c_wtcLinear)
// L7778
WaterSetState("Template 1|Lava 2", gv__4TimeLimit, c_wtcLinear)
// L11676
WaterSetState("Template 2|[Default]", 0.0, c_wtcLinear)
// L11677
WaterSetState("Template 2|Cine4 Lava", 90.0, c_wtcLinear)
// L12023
WaterSetState("Template 1|[Default]", 0.0, c_wtcLinear)
// L12125
WaterSetState("Template 1|Cinematic Lava", 30.0, c_wtcLinear)
// L12141
WaterSetState("Template 1|Cinematic Lava", 3.0, c_wtcLinear)
// L641
WaterSetState("Template 1|[Default]", 4.0, c_wtcLinear)
// L2790
WaterSetState("Template 1|Alternate Setting 1", 15.0, c_wtcLinear)
// L2871
WaterSetState("Template 1|Alternate Setting 2", 4.0, c_wtcLinear)
// L2913
WaterSetState("Template 1|[Default]", 10.0, c_wtcLinear)
// L4857
WaterSetState("Template 1|Alternate Setting 1", (SoundLengthSync(SoundLink("TTosh01BriefingTosh00001", 0)) + 0.0), c_wtcLinear)
// L4862
WaterSetState("Template 1|Alternate Setting 2", 6.0, c_wtcLinear)
// L4889
WaterSetState("Template 1|[Default]", 1.0, c_wtcLinear)
// L5035
WaterSetState("Template 1|[Default]", 1.0, c_wtcLinear)
// L5240
WaterSetState("Template 1|Alternate Setting 2", 6.0, c_wtcLinear)
// L7778
WaterSetState("Template 1|Lava 2", gv__4TimeLimit, c_wtcLinear)
// L11676
WaterSetState("Template 2|[Default]", 0.0, c_wtcLinear)
// L11677
WaterSetState("Template 2|Cine4 Lava", 90.0, c_wtcLinear)
// L12023
WaterSetState("Template 1|[Default]", 0.0, c_wtcLinear)
// L12125
WaterSetState("Template 1|Cinematic Lava", 30.0, c_wtcLinear)
// L12141
WaterSetState("Template 1|Cinematic Lava", 3.0, c_wtcLinear)
// L420
WaterSetState("Template 1|Alternate Setting 2", lp_duration, c_wtcLinear)
// L435
WaterSetState("Template 1|[Default]", lp_duration, c_wtcLinear)
// L1728
WaterSetState("Template 1|Alternate Setting 1", lv_duration, c_wtcLinear)
// L4291
WaterSetState("Template 1|Alternate Setting 1", 6.0, c_wtcLinear)
// L4298
WaterSetState("Template 1|Alternate Setting 2", 4.0, c_wtcLinear)
// L3231
WaterSetState("PortZion|Alternate Setting", 10.0, c_wtcLinear)
// L3363
WaterSetState("PortZion|Alternate Setting 2", 0.0, c_wtcLinear)
// L3820
WaterSetState("ZerusPool|Alternate Setting", 2.0, c_wtcSquareRoot)
// L3823
WaterSetState("Xil|Alternate Setting", 2.0, c_wtcLinear)
// L3826
WaterSetState("ZhakulDas|Alternate Setting", 2.0, c_wtcLinear)
// L1643
WaterSetState("VespeneLavaWater|[Default]", gv_coreOn_DURATION, c_wtcLinear)
// L1713
WaterSetState("VespeneLavaWater|Alternate Setting", lv_waterTransitionTime, c_wtcLinear)
// L1716
WaterSetState("VespeneLavaWater|Alternate Setting 2", lv_waterTransitionTime, c_wtcLinear)
// L1739
WaterSetState("VespeneLavaWater|Alternate Setting 3", lv_waterTransitionTime, c_wtcLinear)
// L3346
WaterSetState("VespeneLavaWater|Alternate Setting 2", 2.7, c_wtcExponential)
// L3349
WaterSetState("VespeneLavaWater|Alternate Setting", 0.0, c_wtcExponential)
// L3357
WaterSetState("VespeneLavaWater|Alternate Setting 3", 3.0, c_wtcExponential)
// L3496
WaterSetState("VespeneLavaWater|[Default]", 0.0, c_wtcLinear)
// L420
WaterSetState("Template 1|Alternate Setting 2", lp_duration, c_wtcLinear)
// L435
WaterSetState("Template 1|[Default]", lp_duration, c_wtcLinear)
// L1728
WaterSetState("Template 1|Alternate Setting 1", lv_duration, c_wtcLinear)
// L4291
WaterSetState("Template 1|Alternate Setting 1", 6.0, c_wtcLinear)
// L4298
WaterSetState("Template 1|Alternate Setting 2", 4.0, c_wtcLinear)
// L3231
WaterSetState("PortZion|Alternate Setting", 10.0, c_wtcLinear)
// L3363
WaterSetState("PortZion|Alternate Setting 2", 0.0, c_wtcLinear)
// L3820
WaterSetState("ZerusPool|Alternate Setting", 2.0, c_wtcSquareRoot)
// L3823
WaterSetState("Xil|Alternate Setting", 2.0, c_wtcLinear)
// L3826
WaterSetState("ZhakulDas|Alternate Setting", 2.0, c_wtcLinear)
// L1643
WaterSetState("VespeneLavaWater|[Default]", gv_coreOn_DURATION, c_wtcLinear)
// L1713
WaterSetState("VespeneLavaWater|Alternate Setting", lv_waterTransitionTime, c_wtcLinear)
// L1716
WaterSetState("VespeneLavaWater|Alternate Setting 2", lv_waterTransitionTime, c_wtcLinear)
// L1739
WaterSetState("VespeneLavaWater|Alternate Setting 3", lv_waterTransitionTime, c_wtcLinear)
// L3346
WaterSetState("VespeneLavaWater|Alternate Setting 2", 2.7, c_wtcExponential)
// L3349
WaterSetState("VespeneLavaWater|Alternate Setting", 0.0, c_wtcExponential)
// L3357
WaterSetState("VespeneLavaWater|Alternate Setting 3", 3.0, c_wtcExponential)
// L3496
WaterSetState("VespeneLavaWater|[Default]", 0.0, c_wtcLinear)