I'm new to this forum and construct.
I am trying to create a small "game management" and I need your help on a problem I encounter.
I have a sprite (called "miner") that is automated based on several variables such as "Thirst", "Hunger," "Sleep" and other.
When these variables, a condition managed by "Time" reaches a certain value, my "miner" moves respectively sprites "Water," "Food" and "Bed" for example, which has the result, the duration it overlaps the sprite, to increase the values of variables ...
So far, no problem ...
My worry is that I want to create an infinite number of clones of my sprite "miner" but when I did it with private variables (or global), they obviously share the same variable.
So I test it with a "Hashtable" and by putting an object ID, but they share the same key (it's hard for me as a beginner to understand this stuff).
In short, it does not work!
Do you have a solution?
The hash table is it the right way and if so, how to set up for me?
Thank you in advance.
PS: It's been three days that I have tested everything and looking for a solution on the forum posts but I think not or do not understand what is being proposed, so excuse me if a solution has a similar problem has already been posted and I have not seen.
And my apologies for my English (it must then blame google translate;)).