Is there a way to run a series of event commands on loop until a player presses a button.

Apple_Tart

Villager
Member
Joined
Mar 26, 2021
Messages
17
Reaction score
1
First Language
English
Primarily Uses
RMMV
I'm making an adult game that involves sex scenes. I'm doing them with show pictures at the moment and I sort of fade between two or three frames of an animated sequence of pictures.

If possible, I'd like the image sequence to just keep playing until the player presses a button or chooses to advance in an option in the Show Choices command.

Is this possible at all?

Thanks!
 

coucassi

Veteran
Veteran
Joined
Sep 23, 2019
Messages
127
Reaction score
175
First Language
German
Primarily Uses
RMMV
There is a loop command on page 1 in the event command section. Just create an If-Condition, that says to end the loop if button X is pressed.

Regarding the Show Choices Window I am not sure. You want to have the scene played, while the choices are shown and to end, when the player chooses, yes?
In this case I would rather make the images be called by a repeating parallel event, that is turned off by a switch triggered when the right option is chosen.
 
Last edited:

Apple_Tart

Villager
Member
Joined
Mar 26, 2021
Messages
17
Reaction score
1
First Language
English
Primarily Uses
RMMV
There is a loop command on page 1 in the event command section. Just create an If-Condition, that says to end the loop if button X is pressed.

Regarding th Show Choices Window I am not sure. You want to have the scene played, while the choices are shown and to end, when the player choses, yes?
In this case I would rather make the images be called by a repeating paralel event, that is turned off by a switch triggered when the right option is chosen.

Before I read your reply I was actually doing your first suggestion. That actually works really well, except for one thing: the player has to be holding the required button down at the end of the sequence for it to register. Like, if there's 5 frames to a sequence and the player is only holding it down for the first 4 and then lets go, it won't stop the animation because they weren't holding it for the 5th when it actually checks for the input press.

Although, I suppose I could copy and paste the input check and put it after each image.

The parralell event idea would probably work. Seems a bit confusing, but I'll give it a go. Thanks!
 

Htlaets

Veteran
Veteran
Joined
Feb 1, 2017
Messages
219
Reaction score
118
First Language
English
Primarily Uses
The parralell event idea would probably work. Seems a bit confusing, but I'll give it a go. Thanks!
It's the best option for your use case since parallel events naturally loop, but I suggest you use a variable instead, since it'll allow you to advance the scene. If you have a lot of scenes like this, I'd do a combination of a variable and a switch so that you can reuse both (If it's just a variable, it's a bit more of a pain to reuse since you can only do greater than values), like so:
1620566505131.png

Just make sure the meat of your event is in the autorun side.
There are also plugins to streamline animating pictures, but that's another thing.
 

Apple_Tart

Villager
Member
Joined
Mar 26, 2021
Messages
17
Reaction score
1
First Language
English
Primarily Uses
RMMV
It's the best option for your use case since parallel events naturally loop, but I suggest you use a variable instead, since it'll allow you to advance the scene. If you have a lot of scenes like this, I'd do a combination of a variable and a switch so that you can reuse both (If it's just a variable, it's a bit more of a pain to reuse since you can only do greater than values), like so:
View attachment 188794

Just make sure the meat of your event is in the autorun side.
There are also plugins to streamline animating pictures, but that's another thing.

I actually just tried using a variable.

So what I did was I have an Para event that is checking for a button press. When it detects OK it adds 1 to a variable called Anim Stop. Then, in my main event where the animation is looping, at the end of each loop it checks to see if Anim Stop is greater than 0. If it is, then it stops.

It's working pretty well.

How do I get rid of these Paralell events when I'm done so they're not always running though?

I am using Yanfly's move route plugin. That lets me use a moveroute to tell another event to Toggle its self switch on or off. Does that stop a parralell completely?

Sorry. To be honest, I don't really ever use parallel events.
 

Htlaets

Veteran
Veteran
Joined
Feb 1, 2017
Messages
219
Reaction score
118
First Language
English
Primarily Uses
I actually just tried using a variable.

So what I did was I have an Para event that is checking for a button press. When it detects OK it adds 1 to a variable called Anim Stop. Then, in my main event where the animation is looping, at the end of each loop it checks to see if Anim Stop is greater than 0. If it is, then it stops.

It's working pretty well.

How do I get rid of these Paralell events when I'm done so they're not always running though?

I am using Yanfly's move route plugin. That lets me use a moveroute to tell another event to Toggle its self switch on or off. Does that stop a parralell completely?

Sorry. To be honest, I don't really ever use parallel events.
In the picture I posted, it says how. If none of the pages of an event have a "true" condition, then the event doesn't run. In my example, if both pages require the condition of "tempswitch is on" then if you turn the tempswitch off, neither page will run (this will also allow you to pause and unpause your animation from your main event relatively easily).

And, yes, you can put a blank page with a self switch condition, and if that page's condition is true, the event won't run. If you've used autorun events before, it functions in a similar manner (except parallel events end immediately when you move off the page or transfer maps and don't finish a loop).

I don't suggest using a self switch if you're gonna be doing this type of thing repeatedly, since you'll have to make a new variable every time. It's easier to have temporary switches and variables to control things like this in the long run.

Also, you should probably get used to using parallel events. You're gonna want to use parallel events a lot, they're very useful since there's no limit to how many can be running (other than hardware limitations), and that allows you to do all sorts of things simultaneously.
 

Apple_Tart

Villager
Member
Joined
Mar 26, 2021
Messages
17
Reaction score
1
First Language
English
Primarily Uses
RMMV
In the picture I posted, it says how. If none of the pages of an event have a "true" condition, then the event doesn't run. In my example, if both pages require the condition of "tempswitch is on" then if you turn the tempswitch off, neither page will run (this will also allow you to pause and unpause your animation from your main event relatively easily).

And, yes, you can put a blank page with a self switch condition, and if that page's condition is true, the event won't run. If you've used autorun events before, it functions in a similar manner (except parallel events end immediately when you move off the page or transfer maps and don't finish a loop).

I don't suggest using a self switch if you're gonna be doing this type of thing repeatedly, since you'll have to make a new variable every time. It's easier to have temporary switches and variables to control things like this in the long run.

Also, you should probably get used to using parallel events. You're gonna want to use parallel events a lot, they're very useful since there's no limit to how many can be running (other than hardware limitations), and that allows you to do all sorts of things simultaneously.

Ah, I see. Using a switch will probably be better like you say. I'll do that.

And I'll start learning more about parallel events. I'm always just afraid to use them because I don't want to cause slowdown + I haven't really had the need until now.
 

Htlaets

Veteran
Veteran
Joined
Feb 1, 2017
Messages
219
Reaction score
118
First Language
English
Primarily Uses
Ah, I see. Using a switch will probably be better like you say. I'll do that.

And I'll start learning more about parallel events. I'm always just afraid to use them because I don't want to cause slowdown + I haven't really had the need until now.
One way to avoid slowdown is to build wait times into parallel events. In general, it's a good idea to have a minimum of 2 frames of wait at the end of a parallel event since that won't actually cause a significantly noticeable delay in the event's cycling while lowering performance impact. Add more frames if the parallel event can afford to be delayed more.
 

Apple_Tart

Villager
Member
Joined
Mar 26, 2021
Messages
17
Reaction score
1
First Language
English
Primarily Uses
RMMV
One way to avoid slowdown is to build wait times into parallel events. In general, it's a good idea to have a minimum of 2 frames of wait at the end of a parallel event since that won't actually cause a significantly noticeable delay in the event's cycling while lowering performance impact. Add more frames if the parallel event can afford to be delayed more.

Oh, great. I did that already. It was playing smoother with the animation, so I'm glad that helps.

Going to use the switch to change the parralell event's page to turn it off.

Thanks for the help. It's all running really smooth now.
 

Latest Threads

Latest Posts

Latest Profile Posts

Hope he recovers fast :|
Looks like it's functional:
It's a common thing to forget eating &drinking while you are working concentrated, right?
If I had discovered RPG-Maker before moving together with my girlfriend, I'd have died of dehydration a long time ago.
Ami
trying to change my picture & got screwed up...
I've been busy working on my next music pack, and I've also been busy composing some personal compositions. Depending on the type of mood and setting, sometimes I just really love the sound of music created in lofi mono. It has its charm.

Forum statistics

Threads
112,491
Messages
1,068,663
Members
146,161
Latest member
Zuumie
Top