for example
I want to keep track of a sprite object (dots,balls, you get what I mean).
More of it (instances I assume) spawns with time.
I want to create a set amount that will increase over time too.
Hence I thought of 2 variables to keep track.
One keeps track of how many of that object exist and the maximum amount of that object should exist.
So I thought I could attack 2 private variables to an object such as a text object.
So I created
DotCount :: variable that keeps track of actual amount
DotCountMax :: variable that is the number of maximum amount that the sprite object should exist
That's just one object. There's actually 3 more so...
DotCount
DotCountMax
YDotCount
YDotCountMax
GDotCount
GDotCountMax
Each of these I use to keep in check how many of those objects exist. How I do that is when an event is executed the object/instance spawns in the layout and variable DotCount increases by 1 to indicate there's 1 more of that object in existence.Then DotCount is compared to DotCountMax to see if DotCount < DotCountMax, if so then the cycle repeats and instance is created again.
If there's a simpler way then please do tell me.If not would using pv more manageable than the other ways? Or am I understanding this all wrong and infact hash tables and arrays are nothing like pv (I know arrays are different).