*SIMPLE Q, CAN'T FIND DIRECT ANSWER...

Posts

Pages: 1
Hey guys -

Here is what I'm trying to do on (all over my map).

I have chests/boxes etc that give my hero a certain amount of money when activated. I also have switches enabled that remove the money afterward and say "empty". So when you activate a chest, you get an item. When you activate it a second time, you get "empty". Perfect.

However, that is only perfect for UNIQUE items. I can't figure out how to make items come and go. For example:

You check a chest and get 50 gold. You immediately check it again and get "empty". How can I make the chest randomly regenerate the 50 gold over certain periods of time??

This really applies to ALL of my boxes/chests etc. I want to add depth by making areas searchable infinitely. (Check the same room and finding different things later, but not the SAME things right away). Again, I know switches/variable and just need a breakdown of how this can be accomplished. Thank you!

In a nutshell: how can I make items appear, disappear, and reappear at random times in a chest for a hero to get more than once? (Like gold...)
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Actually, this isn't a simple question at all!

First you have to decide what you want to trigger the "random" regeneration. Time? Walking a certain number of screens away? Plot events? Opening other chests?

Then you need to make a common event that either detects when that thing happens, or gets called each time that thing happens. For each switch that you want to reset, have the common event set a variable to a random number between, say, maybe 1 and 10 (for a 10% chance to reset the switch). Then use a conditional branch to check if the variable is equal to 1, and if so, turn the chest switch back off. Repeat for every chest you want to be able to reset.

If you respond and tell us what exactly you want the chest respawn to be triggered by, and also which RPG Maker you're using, I (or someone else) can give you a more detailed explanation.
Thank you LockeZ! I'm currently using RPG Maker 2003 and I'm trying to make boxes/chests that regenerate loot over periods of time. There has to be a way to do this (without wasting every single switch available...)

I want a box to have gold for example. When the player gets the gold, I want the box to say "empty". Then, after maybe 5 minutes of real time - I'd like the gold to regenerate. How can I achieve this??
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Basing it on time is one of the easier ways. You'll need to use a timer, and one variable.

Make a common event. Set your variable equal to Timer 1. Then create a conditional branch, checking if the variable is equal to zero. If it is equal to zero, turn back off all the chest switches that you want to regenerate, and then start Timer 1. When you start Timer 1, set it to 10 minutes, and make it not be displayed. Whether you want it to run during battle or not is your choice.

Remember: This'll happen every 10 minutes. So if you open a chest, it'll be an average of 5 minutes before it respawns, but it might be 10 minutes or it might be 1 second.

I'd recommend either setting a much longer timer, or giving each chest only a 10% chance to respawn every time the timer runs out. 5 minutes is really short. But maybe a really short timer is appropriate for your game, if you're making a farming sim or something.
Pages: 1