The Dink Network

Sound change with view

October 23rd 2009, 05:07 AM
wizardg.gif
schnapper
Peasant He/Him Heard Island And Mcdonald Islands
Let us save our effort and just lie down and die. 
The question of the moment is, can I change the background music in a place after an event has taken place? If so, how?

Example: The town of Keinridge is being repeatedly raided by Polgras the fabulous mountain troll and Lord Popenjay begs you for help. Doom 'n' gloom music plays whenever you enter town until you slay Polgras, after which stereotypical peaceful-town music plays.
October 23rd 2009, 05:26 AM
burntree.gif
Fireball5
Peasant He/Him Australia
Let me heat that up for you... 
have a script attached to the screen that plays music depending on variables, rather than setting actual background music?
October 23rd 2009, 07:51 PM
duck.gif
wesley
Peasant He/Him United States
 
//replaces whatever midi is currently playing
playmidi("filename.mid");
October 23rd 2009, 08:22 PM
wizardg.gif
schnapper
Peasant He/Him Heard Island And Mcdonald Islands
Let us save our effort and just lie down and die. 
Thanks =D
October 25th 2009, 10:02 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I'm getting an odd bug with doing this on a screen with background music. Dink thinks that the new MIDI has changed to the background MIDI causing the new MIDI to play from the start every time.

Very irritating... Can't have a background MIDI; you have to do both from the script.
October 25th 2009, 10:42 PM
spike.gif
What do you mean? If it's that the launched-from-script midi restarts every time you enter a screen with background music, that's not really a bug. You could use the turn_midi_off() command to disable the background music, though just handling both in the script is probably as (or more) convenient.
October 25th 2009, 11:15 PM
pq_knight.gif
ExDeathEvn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
How about using a global variable to decide which midi to be playing, but have each midi scripted and neither a background midi? Just my 2cents.
October 26th 2009, 08:32 AM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Forgot about that one, thanks. Turn_midi_off() would probably be more convenient for a town that has different songs in houses as well as a town theme.