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.

Better Variable Management for Item Gathering?

I wasn't entirely sure what to title the topic lol I hope my following description explains fully what I'm looking for.

Basically I need a script that can track everything globally, I don't have enough variables and what not for plants and mines and things like that.

I need a script that recognizes events as (for example) Iron or Herbs. So if I label an event 'Iron' the script will automatically recognize this event and set the ability to mine iron from this event, along with a time to which the iron respawns.

The time must continue to count down even when the player is on a different map.

Can this be done with events using global events? No. Why? 5000 variables isn't enough.

If I have 10 plants on one map, I can only have 10 plants for 500 maps. This may sound like a lot, but this doesn't include ores and other collectibles and it doesn't include mini games and things unrelated that require variables. So basically it uses up way more variables than I'd like it to.

Also if a script handles it, then I don't have to set a new variable and re-event it every single time I want a collectible. One variable can't apply to more than one thing as they will respawn at the same time even if you picked one 10 mins ago and one 1 second ago.

Anyway, I think I'm clear in what I need but not necessarily on how to achieve it. I hope the scripters here have can think of something because I seem to have hit the road block eventing wise.
 
Mmm not sure.
I could probably get around to writing a script for this - I'll probably start in the school holidays.

Perhaps an Array stored in $game_system containing arrays like [[map_id, ev_id],[map_id, ev_id]] and upon entering a map it will check and modify the self switches accordingly. . .
Hmmm i'll see :)
 

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