Random battle processing region id

Hi all. I am hoping this is in the right place as I am new.

I am having a bit of trouble. I have a quest, and they have to go to the woods once activated from NPC.
So this is what I have (Region 7 is the woods), but it is not working. (Randomizer is low for debugging)
Region ID works as I use it to change battle backs depending on region.

Control variable: region x = map x of player
Control variable: region y = map y of player
Get location Info: Region ID, Region ID, ({Region X},{Region Y})
If: Region ID = 7
If: *quest variable*=1
Control Variables: Random monster = random 1..2
If: Random Monster = 1
Battle Processing : Werewolf
Control Variable: *quest variable +=1
Control Self Switch: A = ON
End
End
End

1718663570989.png
Welcome!

Next time, please attach an actual screenshot of your event. Just pasting the commands doesn't show us anything about how the event itself is set up or being called. That whole left panel is probably where your problem is.
Welcome!

Next time, please attach an actual screenshot of your event. Just pasting the commands doesn't show us anything about how the event itself is set up or being called. That whole left panel is probably where your problem is.
Thank you for the tip. I am new and wasn't sure of the process. Attached a screenshot now. I hope thats enough
As a general rule, you almost never want a parallel event running with no wait command. That tries to execute every frame, 60 times a second. You don't need to check for player movement that often.

Having a Wait 6 at the bottom will help to make sure your game doesn't get any lag.

That being said, your event looks like it should work.

I'd suggest you put some Show Text commands at different points, inside different conditional branches, to see how far the event is getting.
As a general rule, you almost never want a parallel event running with no wait command. That tries to execute every frame, 60 times a second. You don't need to check for player movement that often.

Having a Wait 6 at the bottom will help to make sure your game doesn't get any lag.

That being said, your event looks like it should work.

I'd suggest you put some Show Text commands at different points, inside different conditional branches, to see how far the event is getting.
Awesome tip with the "wait" command. Never thought of that!

And I also love the "show text" idea as well. These are amazing debugging tips I had not even considered.

Not sure how to mark this as solved.

It was 100% the "wait".
Without it, once I did the text debug idea, could see it was doing the first 2 ifs constantly until random numbers matched and then would enter the werewolf battle. With the WAIT command, it allowed me time to run around in the area more until it all matched and now that the random number is 1-40, it keeps me searching for longer with battles with the normal creatures in the area!

Thank you so much for your help @ATT_Turan
1718669478035.png
Not sure how to mark this as solved.
Just click the report button at the bottom left of your post and for the reason of the report write "solved".
Whenever a mod has free time, they'll swing by and mark it solved for you.
This thread is closed due to being reported as solved. If you need it reopened, report it to let us know.

Original thread: https://forums.rpgmakerweb.com/threads/random-battle-processing-region-id.169582/