Animation Loop/ Loop Break!

mardin

"...pretty please?"
Veteran
Joined
Nov 8, 2015
Messages
252
Reaction score
125
First Language
German
Primarily Uses
Hi guys, I need your help -

I've been working with pictures a lot lately, to add variety to my games. For example, when the hero comes to a specific place, he can meditate to regain mana. If he decides to do that, a short animation of 3 pictures comes up.

Now, I want the player to decide how long he wants to meditate on that place...it doesn't do anything special, but maybe he likes the animation and the music and wants to watch it longer.

How do I do that? I know how to set up the animation with Show and Move Pictures...but I am unable to break the loop. I want to break the loop with a specific button (Enter, for example). So when the player decides to meditate, he can watch the animation as long as he wants and when he's seen enough, he can hit enter, breaks the loop, gets his mana regeneration and can move on.

How can I do that? Please help me!
 

The Stranger

The Faceless Friend
Veteran
Joined
Sep 14, 2012
Messages
3,341
Reaction score
21,535
First Language
British English
Primarily Uses
RMMV
Hmm. Not sure. However, I use invisible text boxes to prevent an event from ending\moving forward until the player has pressed enter\spacebar, when designing readable material in my game. Maybe you could have one event playing that looks for a key input, and another which displays the animation until a switch is triggered by the other common event. Like I said, though, I'm not 100% sure.
 

mardin

"...pretty please?"
Veteran
Joined
Nov 8, 2015
Messages
252
Reaction score
125
First Language
German
Primarily Uses
That sounds like a solution, though not very clean. I was hoping for a 'One Event Solution'. Loops, Labels, Conditional Branches...whatever. The Break Loop Command somehow isn't working for me :(
 

The Stranger

The Faceless Friend
Veteran
Joined
Sep 14, 2012
Messages
3,341
Reaction score
21,535
First Language
British English
Primarily Uses
RMMV
Yeah. You might be able to create the animation without using the loop command by using conditional branches. I haven't needed to create what you're attempting, however, so it's not something I've had a chance to experiment with. You could have a parallel process with a conditional branch checking for key input, with the event playing out and looping back to the start, if no key input is detected.

Not sure if this method would work, though.

Edit: Just gave it a quick test and it seems to work nicely. You may have to play around with it to force the event to do something else after the "Ok" key has been pressed, else it'll go straight back to looping the animation under the else condition. If you do it using a common event you could just deactivate the activating switch, I think.
 
Last edited:

mardin

"...pretty please?"
Veteran
Joined
Nov 8, 2015
Messages
252
Reaction score
125
First Language
German
Primarily Uses
That wouldn't be a big problem. I think I could do it with a conditional branch and tell the player to "press and hold" the button if he wants to break the loop, so that he doesn't miss the short window when the conditional branch asks wether a button is pressed or not and does the loop otherwise.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top