Sweepstakes

Hello everyone, so I want to make a “Sweepstakes” in my game, for example:

“If you kill this enemy, you have a 75% chance that he will drop a coin”
“If you hit this enemy with your ammo, you have a 15% chance that he will receive poison”

Understand? How do I do this?

Thank you very much in advance :slight_smile:

Just setup where you create a random number, then if that random number is within a certain value, grant a coin to the player or poison the enemy or whatever you want to happen.

So, I kill an enemy, the kill code can generate the random number, check against a reward system, and then grant me the coin if the number is 75 or less.

Most loot systems should have most likely this type of system in place.