1315 Turns on or off cinematic mode. Cinematic mode can be used for cutscenes etc. |
1315 Turns on or off cinematic mode. Cinematic mode can be used for cutscenes etc. |
1316 If `enable` is set to `true`, cinematic mode is enabled, |
1316 If `enable` is set to `true`, cinematic mode is enabled, |
1317 if it is `false`, cinematic mode is disabled. |
1317 if it is `false`, cinematic mode is disabled. |
1318 |
1318 |
1319 == Sound functions == |
1319 == Sound functions == |
1320 === <tt>!PlaySound(soundId)</tt> === |
1320 === `PlaySound(soundId, [gearUid [, instaVoice]])` === |
1321 Plays the specified sound. Possible values for `soundId` are listed on the [Sounds] page. |
1321 Plays the specified sound. Possible values for `soundId` are listed on the [Sounds] page. |
1322 |
1322 |
1323 === <tt>!PlaySound(soundId, gearUid)</tt> === |
1323 If `gearUid` (optional argument) is set, you can also play a voice, see [Taunts] for a list. `gearUid` is the hedgehog gear which is used to “speak”. |
1324 Plays the specified sound for the chosen hedgehog gear. This can be used to play a taunt with the voicepack of the hedgehog’s team. |
1324 |
1325 |
1325 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`. |
1326 Possible values for `soundId` are listed on the [Sounds] page. See also [Taunts]. |
1326 |
|
1327 === `SetSoundMask(soundId, isMasked)` (0.9.24) === |
|
1328 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. |
|
1329 |
|
1330 Sounds played by the Lua function `PlaySound` will always work, however, and ignore the sound mask. |
|
1331 |
|
1332 Note: Due to the way the voices work internally in Hedgewars, if you want to play a masked voice, you have to set `instaVoice` to `true` when you call `PlaySound`. Otherwise, it won't work. |
|
1333 |
|
1334 Example: |
|
1335 |
|
1336 <code language="lua">SetSoundMask(sndIncoming, true) |
|
1337 -- Disable the “Incoming” sound from being played</code> |
1327 |
1338 |
1328 == File system functions == |
1339 == File system functions == |
1329 === <tt>!HedgewarsScriptLoad(scriptPath)</tt> === |
1340 === <tt>!HedgewarsScriptLoad(scriptPath)</tt> === |
1330 Loads a script (i.e. a [LuaLibraries library]) from the specified `scriptPath`. The root directory is here Hedgewars’ data directory. |
1341 Loads a script (i.e. a [LuaLibraries library]) from the specified `scriptPath`. The root directory is here Hedgewars’ data directory. |
1331 |
1342 |