I'm not justifying myself, but I test a lot of things to learn, so I modify a lot during the process until I get it right.
I added the code as I said, and now it keeps playing the sound from page 3.
The aim is to get it to play the audio normally when it reaches page 3 (and this is working normally). When it exceeds 30 steps, the conditional is then turned on as you can see in the screenshot, but the steps don't seem to be returning to zero, or maybe there's something missing...?
Just an idea, but imagine continuing to use the code on page 1 making the step count become zero, and then creating a system to continue making it work with an addition variable for example would also be interesting to use...
From the outset, when I thought of this system, I searched through the various RMMZ options until I found something that would make the process easier, but I didn't find anything of the sort.
And by the way, even if this system did work, it would still need some way of resetting the step count when entering a battle, because during the tests, I could see that sometimes enemies were generated even before completing the first 10 steps, which would then make this system not complete.
▶ YouTube video