[RESOLVED][XP] Herb Regrowth Event

Started by Dreamplayer, January 08, 2012, 02:01:26 pm

Previous topic - Next topic

Dreamplayer

January 08, 2012, 02:01:26 pm Last Edit: January 13, 2012, 02:32:59 am by ForeverZer0
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

Imagination: The world of your creation
http://www.facebook.com/pages/Dreamer/138997609493107
Check it out!

Boba Fett Link

Maybe ForeverZer0's Dynamic Gardening script might work...

http://forum.chaos-project.com/index.php?topic=6123.0

I don't know, it might not be what you're looking for.
This post will self-destruct in 30 seconds.

The Amazing Link

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.
Spoiler: ShowHide
*leaves without sword* *beats game anyways*

Boba Fett Link

January 08, 2012, 04:47:18 pm #3 Last Edit: January 08, 2012, 05:03:29 pm by Boba Fett Link
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.
This post will self-destruct in 30 seconds.

Dreamplayer

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.

Imagination: The world of your creation
http://www.facebook.com/pages/Dreamer/138997609493107
Check it out!

ForeverZer0

January 12, 2012, 12:13:41 am #5 Last Edit: January 12, 2012, 12:14:47 am by ForeverZer0
Here is a pretty simple solution. You can build upon if easily enough, but it merely requires one variable per plant.

Spoiler: ShowHide


Spoiler: ShowHide


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.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

Actually in this specific case a Self-Variables script would be very useful.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

ForeverZer0

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.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Dreamplayer

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

Imagination: The world of your creation
http://www.facebook.com/pages/Dreamer/138997609493107
Check it out!

ForeverZer0

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Dreamplayer

Perfect thanks!

And this takes care of that issue. :)

Imagination: The world of your creation
http://www.facebook.com/pages/Dreamer/138997609493107
Check it out!