LuaAPI.wiki
changeset 1592 9d79881c31b1
parent 1579 00bcd6b833a5
child 1593 fb9756c246e5
equal deleted inserted replaced
1591:a2986bfc8764 1592:9d79881c31b1
  1468 
  1468 
  1469 To play a voice (see [Taunts] for a list), you must also set `gearUid`. `gearUid` is the hedgehog gear which is used to “talk”.
  1469 To play a voice (see [Taunts] for a list), you must also set `gearUid`. `gearUid` is the hedgehog gear which is used to “talk”.
  1470 
  1470 
  1471 If you play a voice, by default the voice will respect an internal queue and might be played with an delay in order to prevent annoying voice overlapping. Since version 0.9.24, you can disable this behaviour and force Hedgewars to instantly play the voice by also setting `instaVoice` to `true`. Only use `instaVoice` when you really need it.
  1471 If you play a voice, by default the voice will respect an internal queue and might be played with an delay in order to prevent annoying voice overlapping. Since version 0.9.24, you can disable this behaviour and force Hedgewars to instantly play the voice by also setting `instaVoice` to `true`. Only use `instaVoice` when you really need it.
  1472 
  1472 
       
  1473 === `PlayMusicSound(soundId)` (0.9.25)` ===
       
  1474 Plays a sound as replacement for the background music. The sound is played once. The main music is paused and the sound is played instead. The main background music does not resume automatically, so you should call `StopMusicSound` after a while.
       
  1475 
       
  1476 Example:
       
  1477 <code language="lua">
       
  1478 PlayMusicSound(sndRideOfTheValkyries) -- Replace the background music the Ride of the Valkyries
       
  1479 </code>
       
  1480 
       
  1481 === `StopMusicSound(soundId)` (0.9.25)` ===
       
  1482 Stops the specified “music sound” (if it was still playing) and resumes the main background music.
       
  1483 
  1473 === `SetSoundMask(soundId, isMasked)` (0.9.24) ===
  1484 === `SetSoundMask(soundId, isMasked)` (0.9.24) ===
  1474 Disables a given sound (including taunts) from being played by the engine. `soundId` is a valid sound ID on [Sounds] or [Taunts]. `isMasked` is a boolean. If `true`, the sound will not be played by the engine anymore. If `false`, playing this sound is allowed again.
  1485 Disables a given sound (including taunts) from being played by the engine. `soundId` is a valid sound ID on [Sounds] or [Taunts]. `isMasked` is a boolean. If `true`, the sound will not be played by the engine anymore. If `false`, playing this sound is allowed again.
  1475 
  1486 
  1476 Sounds played by the Lua function `PlaySound` will always work, however, and ignore the sound mask.
  1487 Sounds played by the Lua function `PlaySound` will always work, however, and ignore the sound mask.
  1477 
  1488