Hello all,
In my game I want to add herbs (an event) that can be collected from around the maps. However I want the herbs to regrow after a certain amount of gameplay time (15-30 min depending on the rarity of the herb) even if the player leaves the map and does whatever. How would this be done? The herb would regrow in the exact same spot and be the same herb.
Thanks
Maybe ForeverZer0's Dynamic Gardening script might work...
http://forum.chaos-project.com/index.php?topic=6123.0 (http://forum.chaos-project.com/index.php?topic=6123.0)
I don't know, it might not be what you're looking for.
I don't think that this is what DreamPlayer is looking for. This script requires the player to actually plant the herb themselves. I think that DreamPlayer is looking more for something more like in a DragonQuest game.
You may want to try something with variables. Like when you enter the area, a parallel process event randomly decides if the specific herb will be there. The more common the herb, the higher the likelihood.
The only issue is that it would not be constant amounts of time between appearances, and I also could not tell you how to set it up exactly.
I'm pretty sure in the Gardening script you can set them up to grow on their own without planting, but I might be wrong because I only briefly looked over it.
In case it isn't what you are looking for, I'll provide an event system that will help.
Thanks!
But that's not exactly what I was looking for. That script allows the player to plant seeds and grow their own flowers and herbs while I just need a script/ event system that just allows herbs to grow back after a certain amount of playtime. It really could be used with anything. It doesn't necessarily need to be herbs or flowers since I'm working with the time factor of the problem.
The Amazing Link: I really like that idea! The events would have to be repositioned so that none are too close to the edge of a map so its not too easy to find the herbs but that technique would world quite well and still allow a difference for rarity. I'll need to play around with variables for a bit to figure that out.
Here is a pretty simple solution. You can build upon if easily enough, but it merely requires one variable per plant.
(http://dl.dropbox.com/u/20787370/Temp/page1.png)
(http://dl.dropbox.com/u/20787370/Temp/page2.png)
In this example, every 30 seconds the plant will be ready for harvest again. Obviously that number can be set to however many seconds you want.
Actually in this specific case a Self-Variables script would be very useful.
I agree, especially if you plan on having many of these throughout your game. It wouldn't be hard to have a few hundred of them, and that's a lot of game variables dedicated to one thing.
Thanks Forever Zer0! That event system works well and fits the needs of what I was looking for but as you said, there is easily hundreds of these herbs growing around the game world so it would definitely take a large amount of variables simply for this herb feature.
Could someone point me in the right direction for a Self- Variables script? From the name of it I can imagine exactly what it does and that sounds perfect for my current situation.
Thanks
http://forum.chaos-project.com/index.php/topic,5357.0.html
Perfect thanks!
And this takes care of that issue. :)