Howdy
I'm just getting back into RPG Maker VX after a few years off (only really dabbled in it before though). I'm trying to make a little program for my step-son's birthday that's basically a little carnival with some mini games to it.
I'm trying to do a Bet on a Race minigame (similar to the one at the beginning of Chrono Trigger for the SNES if anyone remembers that. I have three events, with graphics of the three racers each moving around the outside of a rectangular area in their own lane (staggered starts of course for the extra distances needed).
I have the events set up for each so that every 10 frames they randomly change their speed, so it's always random who wins. My problem is that I can't figure out how to break the loops once one of the events reaches the "finish line."
Once the player talks to the race starter, the racers proceed along a Custom Autonomous Movement course.
The following is the Race Starter's Event Page 2 (which is triggered upon speaking to him):
(note that 18:13 is the Human racer's finishing coordinates and that I've only added the check for the Human racer to end the loop at the moment)
Using F9 to check the variables, almost everything is working as it should. If the random number for an event is 1, the speed is set to 2, if it's 2 the speed is set to 3, if it's 3 the speed is set to 4.
The problem comes when the Human Racer reaches the finish line, the loop does not stop. I put the text "end!" in there to test to make sure the finish line was triggering both levels of that Condition. The text pops up when the Human Racer event reaches 18:13, but it continues to do so after the player hits the Z key to close the text window. It seems that the loop isn't breaking as it should.
Once that two-level Condition properly breaks the loop, I'd like to add in checks for both the others so that when the first event reaches the finish line, the loop breaks and the Race Starter announces the winner (while the other two events finish the race).
What am I missing here? Is it because the Racer events have a finite route in which they move?
Any help or suggestions would be greatly appreciated. Thanks!
I'm just getting back into RPG Maker VX after a few years off (only really dabbled in it before though). I'm trying to make a little program for my step-son's birthday that's basically a little carnival with some mini games to it.
I'm trying to do a Bet on a Race minigame (similar to the one at the beginning of Chrono Trigger for the SNES if anyone remembers that. I have three events, with graphics of the three racers each moving around the outside of a rectangular area in their own lane (staggered starts of course for the extra distances needed).
I have the events set up for each so that every 10 frames they randomly change their speed, so it's always random who wins. My problem is that I can't figure out how to break the loops once one of the events reaches the "finish line."
Once the player talks to the race starter, the racers proceed along a Custom Autonomous Movement course.
The following is the Race Starter's Event Page 2 (which is triggered upon speaking to him):
(note that 18:13 is the Human racer's finishing coordinates and that I've only added the check for the Human racer to end the loop at the moment)
Code:
Control Switches: [0500:Race Start]= ON
Loop
Control Variables: [0492:Human X] = [Human Racer]'s Map X
Control Variables: [0493:Human Y] = [Human Racer]'s Map Y
Conditional Branch: Variable [0492: Human X] == 18
Conditional Branch: Variable [0493: Human Y] == 13
Text: -,-, Normal, Bottom
: : end!
Break Loop
Else
Branch End
Else
Branch End
Wait: 10 frame(s)
Control Variables: [0499:Cat Speed] = Random No. (1...3)
Control Variables: [0498:Human Speed] = Random No. (1...3)
Control Variables: [0497:Ogre Speed] = Random No. (1...3)
Conditional Branch: Variable [0499:Cat Speed] == 1
Set Move Route: [Cat Racer] (Wait)
$>Change Speed:2
Else
Conditional Branch Variable [0499:Cat Speed] == 2
Set Move Route: [Cat Racer] (Wait)
$>Change Speed:3
Else
Set Move Route: [Cat Racer] (Wait)
$>Change Speed: 4
Branch End
Branch End
Conditional Branch: Variable [0498:Human Speed] == 1
Set Move Route: [Human Racer] (Wait)
$>Change Speed:2
Else
Conditional Branch Variable [0498:Human Speed] == 2
Set Move Route: [Human Racer] (Wait)
$>Change Speed:3
Else
Set Move Route: [Human Racer] (Wait)
$>Change Speed: 4
Branch End
Branch End
Conditional Branch: Variable [0500:Ogre Speed] == 1
Set Move Route: [Ogre Racer] (Wait)
$>Change Speed:2
Else
Conditional Branch Variable [0500:Ogre Speed] == 2
Set Move Route: [Ogre Racer] (Wait)
$>Change Speed:3
Else
Set Move Route: [Ogre Racer] (Wait)
$>Change Speed: 4
Branch End
Branch End
Repeat Above
Using F9 to check the variables, almost everything is working as it should. If the random number for an event is 1, the speed is set to 2, if it's 2 the speed is set to 3, if it's 3 the speed is set to 4.
The problem comes when the Human Racer reaches the finish line, the loop does not stop. I put the text "end!" in there to test to make sure the finish line was triggering both levels of that Condition. The text pops up when the Human Racer event reaches 18:13, but it continues to do so after the player hits the Z key to close the text window. It seems that the loop isn't breaking as it should.
Once that two-level Condition properly breaks the loop, I'd like to add in checks for both the others so that when the first event reaches the finish line, the loop breaks and the Race Starter announces the winner (while the other two events finish the race).
What am I missing here? Is it because the Racer events have a finite route in which they move?
Any help or suggestions would be greatly appreciated. Thanks!