ID:157314
Apr 2 2010, 4:18 am
|
|
I'm sure this has been asked plenty of times but I can't seem to find anything on it. I'm creating a game where you encounter enemies in the grass and there's a random chance of encountering them. I have a formula for that, which is 1 in (187.5/Rarity). How could I program that? I have the area programmed and I know how to use Entered() and Exited() but after that I'm a bit lost.
|
Apr 2 2010, 6:08 am
|
|
if(prob(formula))
|
In response to Emasym
|
|
For some reason, if(prob(1 in (187.5/10))) doesn't seem to work at all. Am I doing something wrong?
|
In response to DisturbedSixx
|
|
"in" is used to specify a list of things, it's not used in your way of things.
Like this: for(var/mob/M in view()) What you need is if(prob(5.33)) |