BonnieLass

Veteran
Veteran
Joined
Mar 31, 2016
Messages
41
Reaction score
4
First Language
English
Primarily Uses
So I want to create a resource gathering system where the resources respawn after a certain number of days, which are kept track of via a variable. I'm stumped as to how to do this though. My solution to the problem is a failure. Basically I set up a system where when a resource is gathered the event changes a selfswitch on so the resource can't be gathered again. Then I have  one variable that holds the number of days needed before a respawn. If that day rolls around or goes past it then the plants or whatever become gatherable again. Trouble is the plants will keep respawning as long as the variable days is equal to the variable respawn! This is obviously not what I want. 


If I try to icrement the number of days for the respawn say from 5 to 10, then all the other gatherable resources littered across the maps become ungatherable. Any ideas for how to make my events respawn every few days?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,289
Reaction score
8,741
First Language
German
Primarily Uses
RMMV
Somewhere you mixed up your event logic, because that should work if done correctly.


Please post screenshots of your event pages so that we can see where you made errors.


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



The solution depends on which maker you're using as well - I'm assuming it's Ace due to your profile. If you're using something else, this will have to be moved again.
 
Last edited by a moderator:

BonnieLass

Veteran
Veteran
Joined
Mar 31, 2016
Messages
41
Reaction score
4
First Language
English
Primarily Uses
I am using rpgmaker vx ace. Sorry for not mentioning that. Here's what my even window looks like for the resource:

Respawn troubleshoot 1.png

Respawn troubleshoot 2.png
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,289
Reaction score
8,741
First Language
German
Primarily Uses
RMMV
Doing it with a parallel process will cause a lot of lag.


If you want to store the time for each planting plot individually, you'll need one variable per event - in that case you're much better off using an event timer script - Shaz wrote one if I remember correctly, just search on the master script list.


If you want to regrow all plants at the same time, you better work with three pages and a reset switch.


In that case, make the second page action button and remove all content


make a third page that is conditioned on the reset switch, make that parallel process and have it control self-switch A off (no other conditions)


If you switch on the reset switch, then all events will reset and as soon as you control off the reset, all plants will be usable again.
 

Balako

PattyCake assosiation
Veteran
Joined
Mar 12, 2016
Messages
220
Reaction score
121
First Language
Arabic
Primarily Uses
N/A
i have made an event that makes resources spawn for one day and stay there untill variable changes ...


its a bit weird but it works for me ... it looks like this


what you can do on this is make the variable increase in common event by whatever amount you like, then when variable reachs X the resource will spawn, and when it does and you collect it make another line that resets variable to 0

page 1   auto run no conditions


if variable HERBS = X


auto Switch A on


else


erase event


--------


page 2 action button  condition auto switch A on


add items by quantity X


switch A off switch B on


----------


page 3 condition auto switch B on


empty page


-------------


page 4 Variable change to X


turn auto switch B off


thats about it for my style, you can use this to get a general idea i guess
 
Last edited by a moderator:

BonnieLass

Veteran
Veteran
Joined
Mar 31, 2016
Messages
41
Reaction score
4
First Language
English
Primarily Uses
Andar:


Maybe I don't understand your suggestion, the second one with the third page. I tried implementing it. The third page I added had the reset switch as the condition and turned off the self switch allowing the harvestable to be harvested again. I used a common event that activates during every day change to the switch on and off on the condition that the day is equal to the number of days til respawn. Then I have a second variable that is the number of days til respawn plus one and when days are equal to that I increment both variables by five and turn of the reset switch. The common event is below:


There are two problems with this setup. 1.) The when the respawn day rolls around and the reset switch is turned on the harvestable respawns infinitely. Which is not what I want. I want it to respawn once and then again 5 days later. My setup was having this same problem. I could have reset switch turned off when you gather the resource, but then other maps with harvestables wouldn't respawn. 2.) If I wait until the day after the respawn day (5 days) then enter a map with a harvestable the reset switch won't be on and the harvestable won't respawn, even though at least 5 days have passed. This problem doesn't go away if I make the conditional branch for the switch: days >= days til respawn. Because the reset switch is turned off the day after the 5 days are past, day six.


Balako:


Thank you for the suggestion but I don't want to respawn each individual harvestable with it's own variable or I'll have hundreds of respawn variables to keep track of.


Shaddow: 


I'll check it out and then get back to you. Thanks!


Thanks to all of you trying to help me!

Respawn troubleshoot 3.png
 

Balako

PattyCake assosiation
Veteran
Joined
Mar 12, 2016
Messages
220
Reaction score
121
First Language
Arabic
Primarily Uses
N/A
@BonnieLass you can make a global variable for the entire resources, i have one for all of them ...


make a condition branch for the variable...


if variable < 6


variable increase by 1 (days number)


else


variable = 0 and when variable = 0 you can have your plants respawn
 
Last edited by a moderator:

BonnieLass

Veteran
Veteran
Joined
Mar 31, 2016
Messages
41
Reaction score
4
First Language
English
Primarily Uses
@Balako But then when the harvestable is harvested and the global variable is reset, then any harvestables on any other maps won't be harvestable. (If i had a penny for every time I used the word harvestable... Sorry, you guys are probably sick of hearing it.) I guess I could have different global variables for each map. That wouldn't be too. many. Maybe I'll do that if I can find no better option.
 
Last edited by a moderator:

BonnieLass

Veteran
Veteran
Joined
Mar 31, 2016
Messages
41
Reaction score
4
First Language
English
Primarily Uses
@Shaddow Um, I can't figure out how to open the file I downloaded and extracted called Lighting Tutorial. When I try to open it then it just goes through the extraction process but doesn't play or open in rpgmaker vx ace. I also can't open the file from within rpgmaker vx ace. What do I do?
 

Balako

PattyCake assosiation
Veteran
Joined
Mar 12, 2016
Messages
220
Reaction score
121
First Language
Arabic
Primarily Uses
N/A
@BonnieLass point noted, didnt focus on that point X, X
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,289
Reaction score
8,741
First Language
German
Primarily Uses
RMMV
If you switch on the reset switch, then all events will reset and as soon as you control off the reset, all plants will be usable again.



@BonnieLass I bolded the important part of my short description above - you need to controll off the reset switch after two or three frames, and it needs to stay off for the harvesting to be possible.
 

BonnieLass

Veteran
Veteran
Joined
Mar 31, 2016
Messages
41
Reaction score
4
First Language
English
Primarily Uses
I'm just going to go with the solution where I have a respawn variable for each map. It's a bit of extra work, but at least I understand how it works. I tested it as well and it works fine. Sorry I couldn't figure out your suggestion Andar, I appreciate the help. Thank all of you for all your help getting me to my solution. Problem solved! :)
 

Shaddow

Scriptlet Nooblet
Veteran
Joined
Oct 12, 2015
Messages
33
Reaction score
2
First Language
English
Primarily Uses
@BonnieLass - I did not have any trouble extracting it or playing it once extracted. I also had a few others try it and there was no trouble. I wish I could give some more help, what is happening when you try to open it once extracted?


Are you attempting to play it or open it as a project? Opening it as a project was the intent, so you can see the events and such.
 

Latest Threads

Latest Posts

Latest Profile Posts

I'm seeing my god daughter's school play next week. Being the mild agoraphobe I am this makes me nervous. Thus I had a dream that it was actually a plot by my best friend to take me clubbing at an establishment where it is customary to throw a harpoon at staff members to reward good service.
Praise be to the game make!
I need help on what I should add to this fighter game.
Should I add:
Rain
Sleet
Snow
Leaves
Wind
If you can come up with anything else let me know.
Final day of the kickstarter campaign and my team and I decide to cap it off by doing ... musical numbers online.

These are clearly definitely My People.
6 hours and 35 minutes until it is December first here :3

Forum statistics

Threads
117,086
Messages
1,104,444
Members
153,079
Latest member
Lnaunboq
Top