Help - Search - Members - Calendar
Full Version: Common Event Delay?
RPG RPG Revolution Forums > Scripting > Event Emporium
Shaddow
I am having a bit of an issue with a common event I'm working with...several actually but they all do basically the same thing.

What happens is I have different items 'recipes' that each call a unique common event and set a variable to a specific number. This part works fine on it's own.

The problem is that I'm using that variable in an autorun event to determine which recipe you are choosing to cook. In theory this should work, I have the conditional branches set up just fine and they work if I manually change the variable. The problem is that the event is not giving me enough time to allow the variable to change when the item is used.

What I do is have the game call the menu, after telling the player to choose a recipe. At that point the player will go into the menu and use a recipe. All works great so far. Next there is a series of conditional branches depending on which of the six recipes were chosen, also one for a '0' on the variable, if the player exited without choosing anything, which repeats the process.

What I'm running into is that the variable does not change immediately, instead it acts as variable = 0 and repeats, now if you choose not to do anything this time or even if you do it then acts as the choice you made the first time. I.E variable = 1, even if you chose nothing or chose a new recipe like variable = 6.

So basically there seems to be a delay on the common event activating. Now I tried this again on a map without the auto run event and checked the variables, each item worked as intended and changed it immediately, so I assume it's something to do with the autorun event itself, also I have tried to use a 'wait' in a variety of places, all with no results.

Any suggestions, or just a new perspective to look at it would be a great help.
X-M-O
The "autorun" feature is really buggy, so I'd recommend you use something else to call the event to start (for example, instead of using autorun, you could make it so that the event begins if the character is moved in any direction - just to get the event started right off).
As long as it begins when you want it to, it is unnecessary to use the autorun feature (which does work in many cases, but you usually have to debug until you realise what specific thing you are doing that makes it not work).

Either way, it is simpler for me personally when I don't use the autorun feature and instead just use a simple statement like "if player moves in any direction then begin this event".
Of course, I used RMXP and I haven't used it in a long while, so... there might be a solution to the problem that is just as easy.
Shaddow
Ah! Thanks a ton X-M-O! It turns out it WAS the autorun, I switched it to parallel process and it works great!
X-M-O
You're welcome. ^^
I know that if there is one way to do something, then there is also almost always an alternative method (software, you know). XD

Parallel process is another way to do that, so yeah good job. happy.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.