◆ AllowDayNightCycleMusic()
| void ModSound.AllowDayNightCycleMusic |
( |
bool |
Allow | ) |
|
Allow the changing of the day/night cycle of music
- Version
- 134.23
- Parameters
-
| Allow | - Boolean - Allow or disallow the cycle |
- Returns
- None
- Example
- ModSound.AllowDayNightCycleMusic(true)
- Note
- Can be used in functions: BeforeLoad()
◆ ChangeAboutMusic()
| void ModSound.ChangeAboutMusic |
( |
string |
ReplacementSound | ) |
|
Change the about screen music
- Version
- 134.23
- Parameters
-
| ReplacementSound | - String - Name of the music .WAV file located in the 'Sounds' folder in your mod |
- Returns
- None
- Example
- ModSound.ChangeAboutMusic(“Halloween”)
- Note
- Can be used in functions: AfterLoad(), AfterLoad_CreatedWorld(), AfterLoad_LoadedWorld(), OnUpdate()
◆ ChangeAllGameMusic()
| void ModSound.ChangeAllGameMusic |
( |
string |
ReplacementSound | ) |
|
Change both day and night music
- Version
- 134.23
- Parameters
-
| ReplacementSound | - String - Name of the music .WAV file located in the 'Sounds' folder in your mod |
- Returns
- None
- Example
- ModSound.ChangeAllGameMusic(“Halloween”)
- Note
- Can be used in functions: AfterLoad(), AfterLoad_CreatedWorld(), AfterLoad_LoadedWorld(), OnUpdate()
◆ ChangeDayGameMusic()
| void ModSound.ChangeDayGameMusic |
( |
string |
ReplacementSound | ) |
|
Change the day music
- Version
- 134.23
- Parameters
-
| ReplacementSound | - String - Name of the music .WAV file located in the 'Sounds' folder in your mod |
- Returns
- None
- Example
- ModSound.ChangeDayGameMusic(“Halloween”)
- Note
- Can be used in functions: AfterLoad(), AfterLoad_CreatedWorld(), AfterLoad_LoadedWorld(), OnUpdate()
◆ ChangeLoadingMusic()
| void ModSound.ChangeLoadingMusic |
( |
string |
ReplacementSound | ) |
|
Change the loading music
- Version
- 134.23
- Parameters
-
| ReplacementSound | - String - Name of the music .WAV file located in the 'Sounds' folder in your mod |
- Returns
- None
- Example
- ModSound.ChangeLoadingMusic(“Halloween”)
- Note
- Can be used in functions: AfterLoad(), AfterLoad_CreatedWorld(), AfterLoad_LoadedWorld(), OnUpdate()
◆ ChangeMenuMusic()
| void ModSound.ChangeMenuMusic |
( |
string |
ReplacementSound | ) |
|
Change the menu screen music
- Version
- 134.23
- Parameters
-
| ReplacementSound | - String - Name of the music .WAV file located in the 'Sounds' folder in your mod |
- Returns
- None
- Example
- ModSound.ChangeMenuMusic(“Halloween”)
- Note
- Can be used in functions: AfterLoad(), AfterLoad_CreatedWorld(), AfterLoad_LoadedWorld(), OnUpdate()
◆ ChangeMusicVolume()
| void ModSound.ChangeMusicVolume |
( |
float |
Volume | ) |
|
Change volume of the music in game
- Version
- 134.19
- Parameters
-
| Volume | - Number (float) - The volume setting |
- Returns
- None
- Example
- ModSound.ChangeMusicVolume(0.0)
- Note
- Can be used in functions: BeforeLoad()
◆ ChangeNightGameMusic()
| void ModSound.ChangeNightGameMusic |
( |
string |
ReplacementSound | ) |
|
Change the night music
- Version
- 134.23
- Parameters
-
| ReplacementSound | - String - Name of the music .WAV file located in the 'Sounds' folder in your mod |
- Returns
- None
- Example
- ModSound.ChangeNightGameMusic(“Halloween”)
- Note
- Can be used in functions: AfterLoad(), AfterLoad_CreatedWorld(), AfterLoad_LoadedWorld(), OnUpdate()
◆ ChangePitch()
| void ModSound.ChangePitch |
( |
string |
EventName, |
|
|
float |
Pitch |
|
) |
| |
Change pitch of an event sound in game
- Version
- 134.19
- Parameters
-
| EventName | - String - The sound event to change |
| Pitch | - Number (float) - The pitch setting |
- Returns
- None
- Example
- ModSound.ChangePitch("AnimalCowEating", 2)
- Note
- Can be used in functions: BeforeLoad()
◆ ChangeSound()
| void ModSound.ChangeSound |
( |
string |
EventName, |
|
|
string |
ReplacementSound |
|
) |
| |
Change an event sound in game
- Version
- 134.19
- Parameters
-
| EventName | - String - The sound event to replace |
| ReplacementSound | - String - Name of the custom sound .WAV file located in the 'Sounds' folder in your mod |
- Returns
- None
- Example
- ModSound.ChangeSound("AnimalCowEating", "Monster") – Where Monster.wav is located under 'Sounds'
- Note
- Can be used in functions: BeforeLoad()
◆ ChangeVolume()
| void ModSound.ChangeVolume |
( |
string |
EventName, |
|
|
float |
Volume |
|
) |
| |
Change volume of an event sound in game
- Version
- 134.19
- Parameters
-
| EventName | - String - The sound event to change |
| Volume | - Number (float) - The volume setting |
- Returns
- None
- Example
- ModSound.ChangeVolume("AnimalCowEating", 20)
- Note
- Can be used in functions: BeforeLoad()
◆ PlayCustom3DSound()
| void ModSound.PlayCustom3DSound |
( |
string |
AudioFile, |
|
|
int |
UID, |
|
|
float |
Pitch = 1.0f, |
|
|
float |
Volume = 1.0f |
|
) |
| |
Play a custom sound at location of an object (specified by UID)
- Version
- 137.14
- Parameters
-
| AudioFile | - String - Name of the music .WAV file located in the 'Sounds' folder in your mod to play - Required |
| UID | - Number (Integer) - The UID of the object in the world - Required |
| Pitch | - Number (float) - The pitch setting - Defaults to 1.0f |
| Volume | - Number (float) - The volume setting - Defaults to 1.0f |
- Returns
- None
- Example
- ModSound.PlayCustom3DSound(“Halloween”, ObjectUID, 1, 1)
- Note
- Can be used in functions: Expose(), AfterLoad(), AfterLoad_CreatedWorld(), AfterLoad_LoadedWorld(), OnUpdate()
◆ PlayCustomSound()
| void ModSound.PlayCustomSound |
( |
string |
AudioFile | ) |
|
Play a custom sound
- Version
- 134.32
- Parameters
-
| AudioFile | - String - Name of the music .WAV file located in the 'Sounds' folder in your mod to play |
- Returns
- None
- Example
- ModSound.PlayCustomSound(“Halloween”)
- Note
- Can be used in functions: Expose(), AfterLoad(), AfterLoad_CreatedWorld(), AfterLoad_LoadedWorld(), OnUpdate()
The documentation for this class was generated from the following file: