Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Event Question

I'm using a mining/crafting system in my game. Atm, i use an event on a rock with a conditional branch to give the player their ore once they find a vein, however, since i used the erase event command, the vein respawns every time you enter the area. Is there a way to make the ore regenerate oh, say, every three hours instead of every time you enter the area? Also if anybody knows how to make a % chance of getting an ore from a rock instead of just getting it when you press the action button on a rock with a vein event on it, please let me know.
 
For the time system for regeneration of the veins, it would require an individual script I believe. I believe the timer only is one instance. I cannot direct you to such a script at my grasp, but try to search for it.

For the chance, basically do as follows:

Control Variables: [0001: Ore Mining Chance] = Random No. (0 ... 100)
Conditional Branch: Variable [0001: Ore Mining Chance] <= 30
  Change Items: [Ore], + 1
End

This basically sets the chance to a number between 0 to 100. If this value is 30 or lower, it gives you an ore.
You can change 30 to whatever you like. 30 would be a 30% chance in this case.

Hope this helps.
 
Re:  The respawning of rock.  It's possible to do some sort of hidden timer/long wait command common event on parallel process, but it would be a pain to do that for too many rocks.  (Of course, if you wanted to be realistic, you could just have the ore not respawn, forcing the player to find new places to mine.  That's how it works in real life, after all...)
 
Unka Josh":22gmdcz3 said:
Re:  The respawning of rock.  It's possible to do some sort of hidden timer/long wait command common event on parallel process, but it would be a pain to do that for too many rocks.  (Of course, if you wanted to be realistic, you could just have the ore not respawn, forcing the player to find new places to mine.  That's how it works in real life, after all...)

This is true, but then that would limit the crafting part of mining&crafting...then again, it could be like one of those bonus things, like try to collect all the ores and get every craft- able item
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top