I am probably overthinking this.
My game has a "Cargo" mechanic, and the player's ship can have a variable number of Cargo Modules that I want to represent in the HUD as Full or not full. But, since the plan is for ships to be player designed and altered during gameplay, I can't know what the maximum number of Cargo Modules will be, so I can't just place 5 or 10 in the HUD and call it done.
This lead me to the thought of creating an irregular grid for the HUD display, and adding (and/or removing) Cargo Module indicators to the grid as needed. This is where I run into a wall of "How do I do that?" I have an event chain that will only run when the Player's Cargo Modules value changes, and an event chain that only runs when the Player's Cargo amount changes.
How do I do the math loop in an event to fill in the grid when more or less sprites are needed?
How do I select the correct HUD display sprite to update from the list of System->CreateObject created sprites?
Thanks in advance!