Is there a way to make enemies, for example, a 1 in 5 chance of dropping a heart or a coin randomly but not dropping both a heart and a coin at the same time pretty much randomizing the chances of them dropping one?
Is there a way to make enemies, for example, a 1 in 5 chance of dropping a heart or a coin randomly but not dropping both a heart and a coin at the same time pretty much randomizing the chances of them dropping one?
in your code after enemy is destroyed, use if pick random number 0 to 50 < 10, then spawn your heart. else if pick random number > 40, then spawn your coin. both will have 1 in 5 chance but will only drop 1 at a time