- 244
- Posts
- 8
- Years
- Ice Path
- Seen May 5, 2025
Hey all, I'm trying to make it so that songs on maps change based on day/night/etc. in Emerald. Now doing this is normally rather easy, if you don't mind the alternate song(s) restarting every time you enter another sub-map. For example, if I put a night-time theme in Littleroot Town, the song will restart from the beginning when entering a house (assuming that the same method was applied to both maps). Here's an example of a level-script that carries that side effect:
Does anyone here happen to know a specific way to put this feature in properly? As in, I go to another map within the same area and it doesn't interrupt the alternate song that is playing. It sort of ruins the ambience when this happens. Any help would be hugely appreciated, as I cannot seem to find any info on this topic by searching anywhere. The only solution I can think of at the moment is to have some sort of ASM routine change all instances of a certain song(s) to another when 0x203C000 is set to 05 (for example). Thing is, I'm clueless when it comes to ASM, and it probably doesn't even work the way I'm describing.
Code:
#freespace 0xFF
#dynamic 0x9C0B20
#org @start
comparefarbytetobyte 0x203C000 0x5
if 0x1 goto @evening
end
#org @evening
playsong2 0x15E
end
Last edited: