Request for help with a misdirect- solved

Hi everyone. I’ve got a sequence which I cannot work out what is wrong and was wondering if another set of eyes might see something obvious. I’m having a problem in a fight sequence where sometimes the game jumps to a win ending without meeting the criteria for it. (To win, the opponent’s health has to be 10 or less, or the number of fight rounds needs to be above 20).

I’m pretty certain I’ve narrowed it down to this sequence of code. Instead of going to the counter attack sequence (goto raishallattack) it jumps to winfight. It is not being triggered by the proper redirect to the winfight as I labeled it in game to see where the error is, and it’s not being shown so is being entirely skipped. Hope this makes sense. This is the problem sequence (I think).

This is what it looks like in game before it redirects incorrectly:

Any help really appreciated. I’ve spent hours over looking for this :beetle:. Cookies offered for solutions :cookie: :cookie: Thanks

This is the follow up sequence it should be redirecting to:

But this is the page that comes up (you can see there’s no text from either the attack win or the rounds win if statements so it seems to have skipped them entirely to redirect to the winfight or winbattle label.

Ok, sorry can’t delete this topic, but I’ve worked it out. The problem was actually further down with a mislabel of an rattack which caused it to skip to the next section if the rand command had chosen that sequence. (I can’t believe how many hours this took me to work out. The wonders of using *rand in your fight sequences, great when it works, but can make pinning down bugs a nightmare :dizzy_face:)


This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.