Hi,
So I've included a feature that with a press of a button the player can drop a wepon and if he chooses he can pick it up as well. Now, I noticed that every time I drop a weapon via using the weapon drop button (not getting hit) the engine puts that weapon in a hardcoded z position but in reality it's creating multiple versions of that same weapon item, so if the player was to pick and drop the weapon over and over, he could literally create a billion.
My question is, how can I control how many weapons are being created "behind the curtains"
Typically a baseball bat will be spawned and needed 3 times on stage , so having a limit of say 5 baseball bats would be nice.
So I've included a feature that with a press of a button the player can drop a wepon and if he chooses he can pick it up as well. Now, I noticed that every time I drop a weapon via using the weapon drop button (not getting hit) the engine puts that weapon in a hardcoded z position but in reality it's creating multiple versions of that same weapon item, so if the player was to pick and drop the weapon over and over, he could literally create a billion.
My question is, how can I control how many weapons are being created "behind the curtains"
Typically a baseball bat will be spawned and needed 3 times on stage , so having a limit of say 5 baseball bats would be nice.