Language…
10 users online:  bebn legg, bradcomp, DanMario24YT, DaveStateGaming, Dennsen86,  MarkAlarm, oliver1, playagmes169,  Sayuri, signature_steve - Guests: 306 - Bots: 427
Users: 64,795 (2,371 active)
Latest user: mathew

More Message Boxes?

I'm having a little problem. I have 2 message boxes in my level and 2 message boxes in my sub-level. When I hit the boxes in my sub-level, it shows me the message from my main level. Can someone please help me? Thanks in advance!
A message box always shows the message of the level you enter from. For example, if you enter level 105 and get to 106 through a pipe or door, and hit a messagebox in that level, it will still display the messages of level 105.

You could try downloading some NPC sprites, those often come with the function to read messaqes from any level.

Alternative, you could also make a custom block to display messages:

Code
LDA #$xx
STA $13BF	; Store as level number.
LDA #$01 	; Message to display.
STA $1426	; Trigger message.


For the level 00-24 you can just replace xx with the number. For the levels 101-13B you have to substract #$DC first (so, for 101 you'd write #$25 for 102 #$26 and so on)
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
Or, you could just download this and edit the .asm file before you insert it.

Code
Main:
LDA #!OneOrTwoOrThree
STA $1426
LDA #!Sound
STA !Bank
PHY
LDA #$02
STA $9C			; Erase self.
JSL $00BEB0
PLY
No:
RTL


Also make sure to delete the Erase self part because that defeats the purpose of a Message Block that stays put for multiple uses.