Help with eventing timing and image change

So I have never scripted before. I have looked at tutorials, but this was my second solo atempt to make something happen and it's failing rather spectacularly. For no particular reason I am trying to make an apple (teacup) spawn under an apple tree, that can then be picked up, and will respawn again after a set amount of time. i have searched the forums but I'm not even sure what I am looking for so any help would be very much appreciated.

What I currently have (that isn't woirking) is this:

  pg 1.JPGpg 2.JPG

I tried a few variations but to be honest I don't remember what they were. I know I have the wrong end of the stick. I''m not sure where the right end is, though. On the up side I did that parallel process+loop=bad (yes, you may laugh, that was a pretty silly thing to do on my part). Like I said, any help you lovely folks would be willing to give would be much appreciated.
Well whats supposed to happen is when the timer is at 2 seconds or more the apple is supposed to spawn right?
You are missing the timer command to create a timer on the 2nd page after the apple has been picked up. Just add it before the "Control Self Switch A = OFF".

There's a script made by Shaz for timers that is good for respawning things.

http://forums.rpgmakerweb.com/index.php?/topic/1516-extended-game-timers/
Myst, It's supposed to go to the second page where the image for the apple is displayed (i didn't have one on hand so substituted a teacup), which then sits there until the player interacts with it, which then when they do it's supposed to reset to the first page which has the timer. In theory. It's not a good theory, apparently.

OK, so the timer needs to be on both pages? It can't just reset back to the first page and run the timer from there (where the 'apple' is invisible)? Thanks. I'm hoping to figure out how to do this with events - or find out it just isn't possible. Either way, this was supposed to be an exercise to increase my own understanding of the event system. I might have over-reached a little?
What you are doing is eventing, not scripting. They are completely different things, so take care to use the correct terms or you'll confuse people.
. . .
You are checking to see what the timer is up to, but you never actually START the timer. And you don't want to start the timer in a parallel process, because it'll always be getting reset. On the first page, you don't need to turn self switch A off, because it's already off.


To do this via events with a parallel process, swap your pages around. Put the apple on page 1, activate it with Action Button, and have your events show the "you have an apple" text, start the timer, and turn self switch A on. On the second page, put self switch A as the condition, no graphic, and set it to parallel process. Then put your condition to see if the timer has reached its limit, and if it has, stop the timer and turn self switch A off (you don't need to do an ELSE here).


Personally, I would not do it like that though. Using the timer, you could only have it control one event at a time, and the countdown/up would be displayed on the screen, which is ugly for something like this. And I don't like having lots of parallel processes running just to check if something has happened, when you already know exactly when it's going to happen. The timer in the game isn't really for doing things like this. I also suggest you check out my event timers script (which will allow you to run many at a time, not just one), which Baka-chan has already linked to.
Thank-you, all. This is exactly what I was hopign for - letting me know the correct terminology, that this is probably not a good idea 😉 and where I'm going wrong. 🙂
So can we close this, then?

Original thread: https://forums.rpgmakerweb.com/threads/help-with-eventing-timing-and-image-change.19444/