Random outcomes in LunaLua
Posted: Mon Sep 17, 2018 7:57 am
I've been wondering: how can you make random outcomes in LunaLua?
For example, let's say you hit an enemy. You can have a 15/50 chance you'll lose all your coins, 30/55 chance that you'll lose your spare power-up, and a 5/50 chance you'll get hurt.
So, how would someone go towards creating random outcomes in LunaLua?
For example, let's say you hit an enemy. You can have a 15/50 chance you'll lose all your coins, 30/55 chance that you'll lose your spare power-up, and a 5/50 chance you'll get hurt.
So, how would someone go towards creating random outcomes in LunaLua?