I need to make a sport the place I can maintain instruments in my hand and stock. Clearly I need to move them between ranges and perhaps even sport classes. Query is, how would I try this?
With easy variables like amount of cash or HP, all I do is retailer a variable within the Sport Occasion. However what about, for instance, a instrument that has extra knowledge, like the category kind, sturdiness, perhaps worth? Even worse, complete array of them?
The best way I exploit that in sport is, there’s an actor representing the instrument. However even when I retailer array of these within the sport occasion, the actors get destroyed whereas altering degree and the array simply factors empty reminiscence. I might simply spawn new ones through the use of the category kind – however that isn’t sufficient for me.
My concept is to create one thing… perhaps a struct, that will maintain the knowledge after which recreate the stock merchandise actors in keeping with the information within the struct.
What are different methods to do it?
Is there one thing basically incorrect with the best way I am storing the objects in my stock now?