# Wait For Sound
Grammar — Wait until sound playback is offset seconds from the offsetType of the sound
Flags —Native
|Action
Waits for a sound is a certain amount of seconds from the offset type.
# Arguments
sound
— Soundfixed
— Offsetint
[ preset::SoundOffset ] — Offset Type
Returns — void
native void SoundWait(
sound s,
fixed offset,
int offsetType,
);
# Related
Category: Sound / Sounds
- [F] —
void
— Play Sound On Unit — ( SoundPlayOnUnitForPlayer ) - [F] —
void
— Play Sound At Point — ( SoundPlayAtPointForPlayer ) - [F] —
void
— Play Sound — ( SoundPlayForPlayer ) - [F] —
sound
— Last Played Sound — ( SoundLastPlayed ) - [F] —
void
— Pause Sound — ( SoundPause ) - [F] —
void
— Stop Sound — ( SoundStop ) - [F] —
void
— Skip To Sound Offset — ( SoundSetOffset ) - [F] —
void
— Move Sound — ( SoundSetPosition ) - [F] —
void
— Wait For Sound — ( SoundWait ) - [F] —
void
— Set Sound Volume — ( SoundSetVolume ) - [F] —
void
— Stop All Trigger Sounds — ( SoundStopAllTriggerSounds ) - [F] —
void
— Stop All Model Sounds — ( SoundStopAllModelSounds ) - [F] —
void
— Set Sound Listener Gender — ( SoundSetListenerGender )
# Examples
# campaigns/liberty.sc2campaign
// 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
// L12031
SoundWait(lv_p_Sound, 0.0, c_soundOffsetEnd)
// L12038
SoundWait(lv_p_Sound, lv_p_Duration, c_soundOffsetEnd)
# campaigns/swarm.sc2campaign
// 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
// L12017
SoundWait(SoundLastPlayed(), 0.3, c_soundOffsetEnd)
# campaigns/void.sc2campaign
// 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
// 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
// L749
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
# mods/liberty.sc2mod
// L574
SoundWait(SoundLastPlayed(), 0.25, c_soundOffsetEnd)
# mods/starcoop/starcoop.sc2mod
// 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
// L2972
SoundWait(lv_bonusSound, 0.0, c_soundOffsetEnd)
# mods/starcoop/starcoop.sc2mod
// L5187
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
# mods/swarm.sc2mod
// L227
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)
# mods/warcoop/warclassic.sc2mod
// L242
SoundWait(SoundLastPlayed(), 0.0, c_soundOffsetEnd)