Made it possible to fade into @music.forceplay
This commit is contained in:
parent
d5ed9d5cca
commit
8b0b977665
|
@ -20,7 +20,7 @@
|
|||
LoopSong = CBool(argument.GetSplit(1, ","))
|
||||
End If
|
||||
End If
|
||||
If argument.Split(",").Length > 2 Then
|
||||
If argument.Split(",").Length > 2 Then
|
||||
FadeIntoSong = CBool(argument.GetSplit(2, ","))
|
||||
End If
|
||||
|
||||
|
@ -41,11 +41,19 @@
|
|||
End If
|
||||
Case "forceplay"
|
||||
Dim LoopSong As Boolean = True
|
||||
Dim FadeIntoSong As Boolean = False
|
||||
If argument.Split(",").Length > 1 Then
|
||||
LoopSong = CBool(argument.GetSplit(1, ","))
|
||||
End If
|
||||
If argument.Split(",").Length > 2 Then
|
||||
FadeIntoSong = CBool(argument.GetSplit(2, ","))
|
||||
End If
|
||||
MusicManager.ForceMusic = argument.GetSplit(0, ",")
|
||||
MusicManager.Play(argument.GetSplit(0, ","), True, LoopSong)
|
||||
If FadeIntoSong = False Then
|
||||
MusicManager.Play(argument.GetSplit(0, ","), True, LoopSong)
|
||||
Else
|
||||
MusicManager.Play(argument.GetSplit(0, ","), True, 0.01F, LoopSong)
|
||||
End If
|
||||
|
||||
If LoopSong = True Then
|
||||
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
|
||||
|
|
|
@ -172,7 +172,8 @@ Namespace ScriptVersion2
|
|||
' Commands:
|
||||
r(New ScriptCommand("music", "play", {New ScriptArgument("musicFile", ScriptArgument.ArgumentTypes.Str),
|
||||
New ScriptArgument("loopSong", ScriptArgument.ArgumentTypes.Bool, True, "true"), New ScriptArgument("fadeIntoSong", ScriptArgument.ArgumentTypes.Bool, True, "false")}.ToList(), "Changes the currently playing music to a new one."))
|
||||
r(New ScriptCommand("music", "forceplay", {New ScriptArgument("musicFile", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Changes the currently playing music to a new one and prevents the music from being changed by warps or surfing/riding and such."))
|
||||
r(New ScriptCommand("music", "forceplay", {New ScriptArgument("musicFile", ScriptArgument.ArgumentTypes.Str),
|
||||
New ScriptArgument("loopSong", ScriptArgument.ArgumentTypes.Bool, True, "true"), New ScriptArgument("fadeIntoSong", ScriptArgument.ArgumentTypes.Bool, True, "false")}.ToList(), "Changes the currently playing music to a new one and prevents the music from being changed by warps or surfing/riding and such."))
|
||||
r(New ScriptCommand("music", "unforce", "Allows warps and surfing/riding etc. to change the music again."))
|
||||
r(New ScriptCommand("music", "setmusicloop", {New ScriptArgument("musicFile", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the map musicloop to a new musicfile."))
|
||||
r(New ScriptCommand("music", "stop", "Stops the music playback."))
|
||||
|
|
Loading…
Reference in New Issue