SetAmbientDaySound
- Parameters
inLabel string- comment
- patch
1.00
- Source
- Blizzard.j (raise an issue to discuss on Github or submit a PR)
- return type
nothing- Source code
function SetAmbientDaySound takes string inLabel returns nothing local real ToD // Stop old sound, if necessary if (bj_dayAmbientSound != null) then call StopSound(bj_dayAmbientSound, true, true) endif // Create new sound set bj_dayAmbientSound = CreateMIDISound(inLabel, 20, 20) // Start the sound if necessary, based on current time set ToD = GetTimeOfDay() if (ToD >= bj_TOD_DAWN and ToD < bj_TOD_DUSK) then call StartSound(bj_dayAmbientSound) endif endfunction