Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Closed TopicStart new topic
> Common Event Delay?, A question this time...
Shaddow
post Sep 4 2012, 12:14 PM
Post #1


The Eventer Inventor
Group Icon

Group: Local Mod
Posts: 1,250
Type: Event Designer
RM Skill: Masterful
Rev Points: 90




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.


__________________________




I support these projects! -------------





Go to the top of the page
 
+Quote Post
   
X-M-O
post Sep 4 2012, 03:00 PM
Post #2


Level 82
Group Icon

Group: Director
Posts: 6,347
Type: None
RM Skill: Undisclosed




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.


__________________________
Go to the top of the page
 
+Quote Post
   
Shaddow
post Sep 4 2012, 03:41 PM
Post #3


The Eventer Inventor
Group Icon

Group: Local Mod
Posts: 1,250
Type: Event Designer
RM Skill: Masterful
Rev Points: 90




Ah! Thanks a ton X-M-O! It turns out it WAS the autorun, I switched it to parallel process and it works great!


__________________________




I support these projects! -------------





Go to the top of the page
 
+Quote Post
   
X-M-O
post Sep 4 2012, 03:49 PM
Post #4


Level 82
Group Icon

Group: Director
Posts: 6,347
Type: None
RM Skill: Undisclosed




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


__________________________
Go to the top of the page
 
+Quote Post
   

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th June 2013 - 02:18 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker