I'm making a action game in which the player will get weapons by destroying boxes. There will be 2 or 3 boxes present on the screen at a time and if the player destroys a box, random weapons will spawn like gun, axe, blade etc.
There is a problem which i'm facing that if i destroy one box, the weapons are spawning from all the boxes. How can i do it?