Quote:
Originally Posted by darkhalo191
Spoiler for Response:
I have not used RPG Maker before nor heard of it so I'll use my questionable C++ knowledge to try to help.
I'll go through the flow of what you've done and maybe you can figure out what happened before I reach the conclusion. Firstly, #1 moves forward then back to it's original position. After that, a variable is changed and switch Sparring1 is turned on. I assume that the variable is a place-holder for something bigger so no problem with that.
Now that the variable is not 0, event 1 will not trigger. However, preconditions for event 2 are satisfied since Sparring1 is on and the variable is 1(which I will stop talking about from here on). Since you want #1 to do nothing, the event page is fine as it is. Moving on to #2, it jumps to attack #1 and moves back. After all that, switch Sparring2 is turned on.
Now we arrive at the problem. Switch Sparring1 is not turned off which causes events 2 and 3 to trigger due to both Sparring1 and Sparring2 being on. Following that logic, both #1 and #2 should jump to attack each other and move back but you observed that only #1 moves. My guess (from googling) is the ticked 'Forbid Event Overlap' caused only #1 to proceed with the event as having both of them do the event would cause them to overlap each other which is forbidden. From then on, #1 infinitely repeats the loop by itself since no preconditions are changed.
To solve it, only one event (2 or 3) should be triggered at a time. The trigger conditions and preconditions are fine but it's the event commands which are tripping you. Switch Sparring1 and Sparring2 are both turned on which causes events 2 and 3 to trigger. Thus, when you turn on Sparring2 (#2's event 2), switch Sparring1 needs to be turned off (in the same event page). Following that, when switch Sparring1 is turned on, the event command below it should be turning switch Sparring2 off.
I'll go through the logic now.
Sparring1 is on and Sparring2 is off. Event 2 is triggered while event 3 is not. #1 does nothing while #2 attacks. Sparring1 is turned off and Sparring2 is turned on.
Sparring1 is off and Sparring2 is on. Event 2 is not triggered while event 3 is. #1 attacks while #2 does nothing. Sparring1 is turned on and Sparring2 is turned off.
Loop continues.
Hopefully that solves it.
|
That was it EXACTLY! I just had to add commands to turn them off in an alternating sequence, as well as untick the Forbid Event Overlap. So that's what I was doing wrong.
You my friend, have my eternal gratitude. Now that I see that, it seems so obvious. But I'm not a programmer so sometimes (actually most of the time) I'm not 100% sure of what I'm doing.
On the plus side, now I'll never be unsure of how to do all the nuances of looping sequences again.
Thank you so much. My words on the internet cannot express my gratitude, truly.