Crop growing event help - how do I make this more efficient?

pastellixs

Villager
Member
Joined
Jun 13, 2020
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMVXA
So I've been using RPG Maker VX Ace for about a month or two now, and I'm struggling on a feature I'm trying to add to my game. I'm trying to make a farming system, and I'm having trouble making the events for it. I'm not quite sure if how I'm doing it is very efficient, but it's the way I've found to make the most sense for me, but I'm still having trouble with it. I currently have 3 event pages for a singular event, and when it reaches the third event, I want it to loop and go back to the first event page and start again. I'm not sure if this is possible, but I'm honestly just stuck on how to make this farming system work. Here's the code I have for each page:

grape1.PNGgrape2.PNGgrape3.PNG

And then I have the timer that counts down when a crop is planted:

grape4.PNG

Another issue I'm having is that not only does the timer for a growing crop restart if another one is planted during the timer countdown, all the crops planted during the timer grow at the same time since they're basically all linked to the same timer event.

I'm genuinely stuck on how to make these events more efficient and make them work properly.. Any help is appreciated :)
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,839
Reaction score
5,222
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to VXAce Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
You've identified the issues with the way you currently have it set up pretty handily: tying it to a "timer" command means you'll reset it every time you plant a grape, and all grapes will grow at the same rate.

Effectively what you need to do is give each grape event its own timer variable, which you'll then check for determining when it's ready for harvesting.

I actually made an event self variables thing for someone the other day that would work well for this, let me see if I can grab a link.

Edit: https://forums.rpgmakerweb.com/inde...self-variables-for-events.124104/post-1090846
 

pastellixs

Villager
Member
Joined
Jun 13, 2020
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Effectively what you need to do is give each grape event its own timer variable, which you'll then check for determining when it's ready for harvesting.
I should probably learn what variables are then since I've never used them before, lol
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
A variable is like a switch but instead of only two possible values (0 - OFF, 1 - ON) you can store any integer value in them.

So for example, if you set a self variable for the crop event called "timer" to, say, 60, and then had a parallel process event that waits 60 frames and then reduces all timer self variables by 1, that event would take a minute to grow. But because it's unique to the event, it wouldn't affect the timer for any other crop event.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@pastellixs As you are new to variables, I strongly suggest that you have a look at Celianna's tutorial that you can find here. It is a playable tutorial, and the best way of using it is to play through it first and then open it up in your editor to see how she did it. It's the best and quickest way I know of learning about them.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top