LuaAPI.wiki
changeset 1593 fb9756c246e5
parent 1592 9d79881c31b1
child 1629 1068da1c7ada
equal deleted inserted replaced
1592:9d79881c31b1 1593:fb9756c246e5
  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)` ===
  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.
  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 
  1475 
  1476 Example:
  1476 Example:
  1477 <code language="lua">
  1477 <code language="lua">
  1478 PlayMusicSound(sndRideOfTheValkyries) -- Replace the background music the Ride of the Valkyries
  1478 PlayMusicSound(sndRideOfTheValkyries) -- Replace the background music the Ride of the Valkyries
  1479 </code>
  1479 </code>
  1480 
  1480 
  1481 === `StopMusicSound(soundId)` (0.9.25)` ===
  1481 === `StopMusicSound(soundId)` (0.9.25) ===
  1482 Stops the specified “music sound” (if it was still playing) and resumes the main background music.
  1482 Stops the specified “music sound” (if it was still playing) and resumes the main background music.
  1483 
  1483 
  1484 === `SetSoundMask(soundId, isMasked)` (0.9.24) ===
  1484 === `SetSoundMask(soundId, isMasked)` (0.9.24) ===
  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.
  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.
  1486 
  1486