The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: Dimosthennis on March 19, 2011, 10:00:13 PM

Title: Question about the event 'wait'.
Post by: Dimosthennis on March 19, 2011, 10:00:13 PM
I have noticed when I made a profession 'mining'. And I want to make the Mines to respown. But the event wait refreshes and stops when you go to another map. I tired to do it with Variables but that did not really work.

Do you know anyway of getting the timer work even when you go to another map?

If you need more information. Please tell so :)
Title: Re: Question about the event 'wait'.
Post by: &&&&&&&&&&&&& on March 20, 2011, 02:18:40 PM
Try common events.
Title: Re: Question about the event 'wait'.
Post by: Dimosthennis on March 20, 2011, 04:35:36 PM
Same Problem :(
I think i need a script for this ...
thanks though
Title: Re: Question about the event 'wait'.
Post by: modern algebra on March 20, 2011, 11:33:06 PM
A script? Nah... common event will do it fine, you just need to use a variable.

One way: You could make the mine a two page event. The first page would be the harvest page, and after you do all the harvesting stuff, all you need to do is turn on a switch (let's call it Switch X). The second page would be conditioned on Switch X and would be blank or say this mine is not ready for harvesting or something.

Then you would make the common event, also conditioned on Switch X, like this:

Wait: 60 Frames
Variable Y: Mine Timer += 1
Conditional Branch: Variable Y == 60
  Switch X = OFF
  Variable Y = 0
Branch End

That should work across maps, and that's just one way you could do it off the top of my head. I am sure there are probably better ways.
Title: Re: Question about the event 'wait'.
Post by: Dimosthennis on March 21, 2011, 11:53:36 AM
Yes that is how I tryed it. But then I need over 500 Switchs and Variable for each mine in my game...
and if I do it on one switch it will count for all mines... Also as a Variable. :(
Title: Re: Question about the event 'wait'.
Post by: modern algebra on March 21, 2011, 12:56:30 PM
Well, technically I could think of a way to do it by ignoring all the switches and just using one variable for each mine. Ie. something like this (where Variable X is a calculation dummy and Variable Y is the variable tracking this mine; it has a ten minute refresh):

Variable X = Play Time
Variable X - Variable Y
Conditional Branch: Variable X > 600
  # Harvest Mine stuff
  Variable Y = Play Time
Else
  # This mine is not ready for harvesting
Branch End

But I imagine that is still undesirable for you. It still uses a lot of variables, but you have a lot of variable to use you know. Why are you making so many mines anyway? I am sure there is a way for you to be strategic - if there's no possible way that the player could harvest two mines within the refresh time you could just use the same variable for both.

But maybe you should explain the system in more detail - I have been acting under the assumption that to harvest a mine, you need to approach the mines individually each time and interact with them - if you have some other system in mind there might be a better way to create a more generalized system.
Title: Re: Question about the event 'wait'.
Post by: Dimosthennis on March 21, 2011, 02:10:00 PM
I got a Alchemy System where the player can make his own Items. Now I got pretting many things like this like A tree that you can
chop down. Or herbs you can find randomly everywhere.
But the timer makes it all a bit buggy... I also got A day and night script from Jet10985 but the Collecting items will still spown all to geather.
2nd I have some areas on in maps where there is like 2-7 mines, herbs or trees to harvest
anyway
I used the Comment Events for the harvest stuff. Easyer to add or remove stuff from the Mine, ETC

I am prtty confused about the 'Variable X = Play Time'.

Tell me if you need more info. :)