# Wait For Sound

Grammar — Wait until sound playback is offset seconds from the offsetType of the sound
FlagsNative | Action

Waits for a sound is a certain amount of seconds from the offset type.

# Arguments

  • sound — Sound
  • fixed — Offset
  • int [ preset::SoundOffset ] — Offset Type

Returns — void

native void SoundWait(
	sound s,
	fixed offset,
	int offsetType,
);

Category: Sound / Sounds

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L706
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L715
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L724
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L1388
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L3224
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L12227
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L3014
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L14586
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L27186
SoundWait(gv_sceneSound, 0.0, c_soundOffsetEnd)
// L3009
SoundWait(SoundLastPlayed(), 1.0, c_soundOffsetEnd)
// L3306
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L1271
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L1833
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L5368
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L9909
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L10694
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L11664
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L2533
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L3347
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L7600
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L706
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L715
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L724
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L1388
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L3224
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L12227
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L3014
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L14586
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L27186
SoundWait(gv_sceneSound, 0.0, c_soundOffsetEnd)
// L3009
SoundWait(SoundLastPlayed(), 1.0, c_soundOffsetEnd)
// L3306
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L1271
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L1833
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L5368
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L9909
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L10694
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L11664
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L2533
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L3347
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L7600
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)

# campaigns/libertystory.sc2campaign

CampaignLib.galaxy

// L12031
SoundWait(lv_p_Sound, 0.0, c_soundOffsetEnd)
// L12038
SoundWait(lv_p_Sound, lv_p_Duration, c_soundOffsetEnd)

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L845
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L3334
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L5185
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L5188
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L3352
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L6487
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L6245
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L6589
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L5661
SoundWait(SoundLastPlayed(), 1.5, c_soundOffsetEnd)
// L8124
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L845
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L3334
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L5185
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L5188
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L3352
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L6487
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L6245
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L6589
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L5661
SoundWait(SoundLastPlayed(), 1.5, c_soundOffsetEnd)
// L8124
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)

# campaigns/swarmstoryutil.sc2mod

Lib281DEC45.galaxy

// L12017
SoundWait(SoundLastPlayed(), 0.3, c_soundOffsetEnd)

# campaigns/void.sc2campaign

MapScript.galaxy

// L2101
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L2105
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L2101
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L2105
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)

# mods/heroesdata.stormmod

SoundLib.galaxy

// L471
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L939
SoundWait(lv_sound, 0.0, c_soundOffsetEnd)
// L950
SoundWait(lv_sound, 0.0, c_soundOffsetEnd)

# mods/heroesmapmods/battlegroundmapmods/warheadjunction.stormmod

LibMSC2.galaxy

// L749
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)

# mods/liberty.sc2mod

LibertyLib.galaxy

// L574
SoundWait(SoundLastPlayed(), 0.25, c_soundOffsetEnd)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L9897
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L30562
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L30615
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L30681
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L30751
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
// L32270
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L2972
SoundWait(lv_bonusSound, 0.0, c_soundOffsetEnd)

# mods/starcoop/starcoop.sc2mod

LibCOUI.galaxy

// L5187
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)

# mods/swarm.sc2mod

SwarmLib.galaxy

// L227
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)

# mods/warcoop/warclassic.sc2mod

WarClassic.galaxy

// L242
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)