Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Fixed] Problem with Conditional Branch trigger

Okay, I've run into a lot of little issues since my last thread and have so far managed to figure them out for myself. This time though, I'm stumped.

Edit: Right, forgot to mention this is running on RMXP.

I have one parallel process event tracking the coordinates of several other events into variables (Event A), and second parallel process event using those variables as conditional branches to trigger various things when those events are in certain places (Event B). Pretty simple. Except now I'm trying to add a new one and it's ignoring the conditional branch.

The branch basically said When Event 1's X is equal to Event 2's X, check Event 1's Y is equal to Event 2's Y (meaning the two are occupying the same spot). If this is all true, then activate a single switch. Except when I start the game and load the map, the switch turns on immediatly regardless of where Event 1 and Event 2 are.

Here's how i've narrowed it down so far:
1: Checked and rechecked all my variables. Everything matches up fine.
2: Figured maybe Event B could only handle tracking so many conditional branches at once. Copied the conditional branch into a new parallel process event. No luck. Erased it and retyped it out of paranoia. Still no luck.
3: Tried to leave a blank "else" on the two conditions (or alternately one or the other). No luck.
4: Tried setting it to one condition (Event 1's X = Event 2's X), and moving them off the same X coordinate. No luck.
5: Tried Setting condition to a completely different variable. No luck.
6: Tried setting to Event 1's X = 0. No luck.
7: Tried setting to Event 1's X = 99. This time it didn't trigger. Interesting...
8: Set Event 1's X = 1. Again it did not trigger. So... what the heck does that mean??
9: Made a new map and recreated Event's A, B, 1, & 2. Am not running into the same problem at all.

So, TL;DR version: It's ignoring a conditional branch when the condition is a variable set to equal 0 or another variable. Does anyone know what could cause this to happen?

Further Edit: Here's the screenshots.

The Layout.
Tracker is keeping track of the variables for everything's X,Y coordinates.
Watcher is looking out for when certain events are in certain places and throwing switches as a result.
Fred is an event that's set to walk around the map.
Mook1 is an event Fred is supposed to walk over. When they occupy the same tile the Watcher is supposed to throw a switch.
EV020 is just an event that pops up a marker graphic when the switch I'm working with is active.
http://img89.imageshack.us/img89/387/co ... opynh3.jpg[/img]
This is coding for the Tracker.
http://img123.imageshack.us/img123/565/ ... opybr1.jpg[/img]
This is the coding for the Watcher. The part that's giving me trouble is at the very bottom of the third image, but I put the rest of it up in case someone see's something in there that's messing it up.
http://img123.imageshack.us/img123/8382 ... opybx2.jpg[/img]
http://img123.imageshack.us/img123/289/ ... opyid1.jpg[/img]
http://img143.imageshack.us/img143/6023 ... opyjn9.jpg[/img]
And this is what happens when I playtest.
http://img227.imageshack.us/img227/109/ ... opyya8.jpg[/img]
 
Are you using XP or VX? VX has some bugs with variables (a default script is messed up) so you might want to take a look at this.

If that's not the problem, a screenshot of the event would also help.
 
Oh right, I should probably mention that. I'm running this on XP. I'll edit the first post too.

I'll try and get a screenshot together. There's a lot going on on this testmap so it might take me a bit.
 
Phage the Untouchable":3ky5bsdf said:
is this what you are trying to do?

More or less yeah. Except the variables are being tracked by a seperate event, and I don't have the "else" options in there. But even when I tried doing it more or less like you have it there it didn't make any difference.
 
Weird.  I use this trick all the time, and I don't see any reason that it would do that if you used the code here.

You might want to triple-check that there aren't any other events running that use those variables, however-- if you've rearranged things, and other events used to adjust those variables, that could be your problem.
 
Unka Josh":25re88cr said:
You might want to triple-check that there aren't any other events running that use those variables, however-- if you've rearranged things, and other events used to adjust those variables, that could be your problem.

Way ahead of you. I tried to trigger the switch with a completely different set of variables that aren't being used for anything, and it still switched on for no reason.
 
Well, all variables start out at 0.  So, what I'm assuming is happening is that, since it's a parallel process, it isn't able to record the correct values (since the map hasn't loaded yet) and it's activating the switch because all the coordinates are still 0.  Try having an autorun that triggers a switch that starts the parallel processes instead of having the parallel processes being on when you start.

That may or may not be the problem.  I haven't looked through all of your event screenshots because I'm working on my own thing, but that's what I've identified as the problem from reading the text.  If that's not the problem, then I'll look through your events when I get the chance.
 
The Guardian":22uiacbb said:
Try having an autorun that triggers a switch that starts the parallel processes instead of having the parallel processes being on when you start.

Well I'll be damned. I actually had to have the Tracker start on Parallel, and the Watcher activated by a switch. But that did it! Thanks a ton Guardian. And thanks to everyone else who pitched in!
 
No problem.  I'm an eventer, so I've pretty much figured out how the different processes work and when they can have problems.

(And eventer is actually a position, in my case, since I've just finished making a battle system with events. :P)
 
The Guardian":32f9ow1h said:
I'm an eventer, so I've pretty much figured out how the different processes work and when they can have problems.

what. EVERYONE WHO USES RPG MAKER should know how the processes work. that whole post there is just really cocky and assholish. i expected different from you guardian (but at the same time it's cute because it's very much IM SO PROUD OF MYSELF FOR JUST MAKING A BATTLE SYSTEM)
 
Phage the Untouchable":e93omfad said:
what. EVERYONE WHO USES RPG MAKER should know how the processes work. that whole post there is just really cocky and assholish. i expected different from you guardian (but at the same time it's cute because it's very much IM SO PROUD OF MYSELF FOR JUST MAKING A BATTLE SYSTEM)

Yeeeow! Pull in your claws there tiger. He was just proud of having accomplished something constructive, nothing wrong with that.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top