Repetitive event with more than one graphic

So Hello guys, In my project right now I currently want to create a place where you can see adventurers practicing their skills on the scarecrow from RMMV (haven't searched for a graphic of a practice dummy). So what happens is that I want for the adventurers to practice their skills for like about 30 seconds then it changes graphic to show them tired on the floor. Then after like a minute they change to the standing graphic and again practicing their skills. And I want this to loop. I already tried doing some things  on this one I tried having a self-switch between the first and second page, however this didn't work. Having tried things already, I got to the point were I couldn't do anything more but asked for help.

Map009.png

My Event.png

My Event1.png
You're turning on two different self switches, but neither of your pages has any conditions.  When deciding which page to make active, the engine starts at the highest numbered one and works back until it finds a page with no conditions, or where all conditions are met.  So page 2 will always be active.


Also, both of your pages have loops, so they are never going to actually get to the self switch commands anyway.  And the second page would not start counting until you interact with it. What will happen is that they'll train for a bit, go into the resting position, and do nothing, until you interact with them.  When you do, they'll say they're tired, wait 30 seconds, freezing the game during that time, say they're tired, wait 30 seconds, and so on.


On page 1 I would get rid of the loop, and repeat those two commands as many times as you needed, then turn on self switch A.


On page 2, set self switch A as a condition, leave it as Action Button trigger and ONLY leave the text command in the command list - get rid of the loop, the waits, and the self switch.  Then create a Custom Autonomous Movement that has a Wait 900 Frames, a Wait 900 Frames, and a Script command that does $gameSelfSwitches.setValue([$gameMap.mapId(), this.eventId(), 'A'], false) to turn off the self switch as part of the move route.


make sure you set your event to Direction Fix so the sprite doesn't change when you interact with it.
You're turning on two different self switches, but neither of your pages has any conditions.  When deciding which page to make active, the engine starts at the highest numbered one and works back until it finds a page with no conditions, or where all conditions are met.  So page 2 will always be active.


Also, both of your pages have loops, so they are never going to actually get to the self switch commands anyway.  And the second page would not start counting until you interact with it. What will happen is that they'll train for a bit, go into the resting position, and do nothing, until you interact with them.  When you do, they'll say they're tired, wait 30 seconds, freezing the game during that time, say they're tired, wait 30 seconds, and so on.


On page 1 I would get rid of the loop, and repeat those two commands as many times as you needed, then turn on self switch A.


On page 2, set self switch A as a condition, leave it as Action Button trigger and ONLY leave the text command in the command list - get rid of the loop, the waits, and the self switch.  Then create a Custom Autonomous Movement that has a Wait 900 Frames, a Wait 900 Frames, and a Script command that does $gameSelfSwitches.setValue([$gameMap.mapId(), this.eventId(), 'A'], false) to turn off the self switch as part of the move route.


make sure you set your event to Direction Fix so the sprite doesn't change when you interact with it.

This is a really great explanation thanks Shaz. I'll go this right now.

Original thread: https://forums.rpgmakerweb.com/threads/repetitive-event-with-more-than-one-graphic.59008/