Changes

Jump to navigation Jump to search
914 bytes added ,  03:19, 19 October 2021
Added sound function reference chart
Line 9: Line 9:     
==Managing audio in SMAPI==
 
==Managing audio in SMAPI==
 +
 +
Here is a reference chart for sound methods which you can use for various cases:
 +
 +
{| class="wikitable"
 +
|+ Singleplayer and multiplayer sound functions
 +
|-
 +
! Singleplayer only name !! Multiplayer equivalent !! Use case
 +
|-
 +
| <tt>Game1.playSound</tt> || N/A || UI and menu sounds; playing a sound for one player only
 +
|-
 +
| <tt>GameLocation.localSound</tt> || <tt>GameLocation.playSound</tt> || For any in-game interactions on specific maps only
 +
|-
 +
| <tt>GameLocation.localSoundAt</tt> || <tt>GameLocation.playSoundAt</tt> || For playing spatial sounds in specific tiles or coordinates, which change volume and location based on player proximity
 +
|-
 +
| <tt>Game1.playSoundPitched</tt> || <tt>GameLocation.playSoundPitched</tt> || For playing any sounds at a different pitch than the original sound
 +
|-
 +
| <tt>DelayedAction.playSoundAfterDelay</tt> || N/A || For playing sounds after a specific period of time has passed
 +
|}
    
===Playing client-side sounds===
 
===Playing client-side sounds===
41

edits

Navigation menu