Random sounds when you walk into a room?

Hey! I feel like I have an idea on how to make this happen, but I'm not sure if I'm on the right track.

I want to have a maze made of separate small rooms, and a character will appear in every room and say something whenever you enter the room. How can I randomize the lines he says?

My idea is to set each voice line to a variable number and then have an event in every room that chooses a random variable that plays one of the random lines. Am I on the right track?
I believe it's right there, and there could be a common event for everyone if the phrases can be said by anyone.
I made an example with music, where the event that starts automatically triggers the common event.

1717550145822.png


1717550429248.png

1717550489092.png
I believe it's right there, and there could be a common event for everyone if the phrases can be said by anyone.
I made an example with music, where the event that starts automatically triggers the common event.

View attachment 307501

View attachment 307502
View attachment 307503
It's definitely appreciated all the effort you went through to take screenshots and notate them, but this is sort of a disaster way of handling this.

So first screen shot, 2 things:
#1 the common event doesn't need to be an autorun.
#2 You don't need to nest the conditionals into the elses. Simply "if var = 1, do this. If var = 2, do that. etc" else not required.

Screenshot 2 might be fine if OP only wants the dialogue to happen once.
If you want it to occur EVERY time the player enters the maze room, then self switches is not the way to go. Instead use an erase event command.
And instead of turning on a switch to turn on a common event, just run the common event from the event map event.

If you want the dialogue to always occur so long as the player hasn't solved the maze, then you might use a second page on the map event, and set the condition to a switch "MazeIsSolved" -> which this also is what needs to be changed with your third screen shot.

Original thread: https://forums.rpgmakerweb.com/threads/random-sounds-when-you-walk-into-a-room.169268/