Hard to explain, so I'll start by explaining what I would like to do. I am trying to find a method of calculating a chance for something to happen after an event happens. So, for example, when the player kills a Monster he has a certain percent chance that this monster will drop(spawn) some ammo.
Now, I've found a way to do it, but I wonder is there's a better one?
I made a variable called RandomNumber
<img src="http://www.freeimagehosting.net/newuploads/k4xaq.png" border="0" />
Then I had an action during the the monsters "death" calculate a random number up too 100for the RandomeNumber variable and the following sub event would find a value between 50 and 100 in it. If it was between those numbers then it would spawn the ammo.
<img src="http://oi41.tinypic.com/34tbwcl.jpg" border="0" />
Seems like a solid solution and I theorize 50-100 of 100 is 50% drop rate. In turn, I have a 50% chance of my monster dropping the ammo. Or, for any number, if you choose any numbers between a certain number that is a percent of that number it will be that percent chance to do what you want. If that makes sense. Sorry.
Anyway, just looking for some input. I did search for this and I apologize in advance if a related topic already exists.