I have a beat em up game and i want my enemy to spawn random items when it’s killed.
for example i have spawnCoin as a function and spawnHealthitem spawnArmouritem etc. and i want each enemy to drop say 2 coins and a health one time or 4 coins and a armour another or just some coins one time.
I know there is a probably a real simple way to do this (probably using math.random somehow?) but can’t get my head around it so any help would be much appreciated!
Regards,
Finn M.