Sound Effects

From OHRRPGCE-Wiki
(Redirected from Sound effects)
Jump to navigation Jump to search

Starting with the Ubersetzung release of the OHRRPGCE, it is possible to use sound effects in your game. This tutorial will demonstrate their proper usage.

Importing Sound effects[edit]

From the Main Menu select Import Sound Effects.

Here you can import sound effect files in OGG, WAV, or MP3 format (WAV and MP3 will be converted to OGG when you import them). Usually you will want to use small sound files.

If you want your sound effects to be known by some name other than the filename, you can rename them here.

Selecting Sound Triggers in CUSTOM[edit]

Attack Sounds[edit]

From the Main Menu select Edit Attacks.

You can choose a sound effect in the Appearance submenu. Press ENTER or SPACE to preview the sound you have selected.

If you need to edit the sound effects on many attacks, remember that you can quickly switch attacks without exiting the Appearance menu. Just hold ALT and press the left and right arrow keys.

Menu Sounds[edit]

From the Main Menu select Edit General Game Data, then pick Special Sound Effects.

Here you can choose sound effects for menus.

Playing a sound with Plotscripting[edit]

The important commands to remember are:

play sound(num, loop, preempt)
stop sound(num)
pause sound(num)

The most important (and thus complicated command) is the play sound command. It takes three parameters:

  • num - the ID number of the sound effect. You can also use the constants from you HSI file in the form sfx:name
  • loop - (optional)if you want the sound effect to loop instead of just playing once, pass true here.
  • preempt - (optional)if the slot is already playing, and preempt is true, the slot will be restarted from the beginning. If it's false, nothing will happen.
play sound(1, true, false) #play sound effect number 0 looped. If it's already playing, don't restart it.
play sound(sfx:meow) # simply play the sound named "meow" with no looping.

Next is the stop sound command. It only takes one parameter, the ID number of the sound to stop.

stop sound(1) #stop sound number 1
stop sound(sfx:gunshot) # stop the sound named "gunshot"

And, related is the pause sound command. If you pause a sound, it will continue from where it left off when you use play sound on it again. If you pause a sound and then resume it, the extra parameters to play sound are meaningless, so you can just leave them off.

pause sound(1)
fight formation(1) #do something
play sound(1) #resume it again

See Also[edit]