Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: Can someone give me the "how to" on 'loop' and 'break loop' commands?
- Original author: MoltresRider
- Original date: July 11, 2023
- Source thread: https://forums.rpgmakerweb.com/threads/can-someone-give-me-the-how-to-on-loop-and-break-loop-commands.159206/
- Source forum path: Game Development Engines > Legacy Engine Support > RPG Maker VXAce Support
Summary
I have never used them and now it comes to the point where using one will likely be necessary for my game. I want to create a loop where a character fights a Bengal tiger repeatedly until the character dies. When the character dies, the loop breaks and the story continues with his friends complaining that the fight was rigged. I have the event set up like this: {
Archived First Post
I have never used them and now it comes to the point where using one will likely be necessary for my game.
I want to create a loop where a character fights a Bengal tiger repeatedly until the character dies. When the character dies, the loop breaks and the story continues with his friends complaining that the fight was rigged.
I have the event set up like this:
Protected download
The thing I do not understand is the "break loop". It makes sense that it would go somewhere in the loop but if it is in the loop, it seems that it would end the loop after the first run. It would not make sense to make loops work that way so there is something I obviously do not understand.
I plan on setting the troop to eat the character after so many turns to force a loss so that it does not endlessly loop. If push comes to shove, I will set up a variable reducing the number of turns required to force loss by one every battle.
It does not let me cut the 'repeat above' so I can place it in "if win" despite the fact that it makes sense that is where it would go.
So how do loops work and how do I set up this particular situation?
I want to create a loop where a character fights a Bengal tiger repeatedly until the character dies. When the character dies, the loop breaks and the story continues with his friends complaining that the fight was rigged.
I have the event set up like this:
Protected download
The thing I do not understand is the "break loop". It makes sense that it would go somewhere in the loop but if it is in the loop, it seems that it would end the loop after the first run. It would not make sense to make loops work that way so there is something I obviously do not understand.
I plan on setting the troop to eat the character after so many turns to force a loss so that it does not endlessly loop. If push comes to shove, I will set up a variable reducing the number of turns required to force loss by one every battle.
It does not let me cut the 'repeat above' so I can place it in "if win" despite the fact that it makes sense that is where it would go.
So how do loops work and how do I set up this particular situation?
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadReferenced Images / Attachments
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...
