Hello.
I use an 2D array to store probabilities.
Lets say the first Y row represents the chances a character has to die from several death causes.
X1 is the chance to die from hearth attacks. X2 is the chance to starve. X3 the chance from being hit by an asteroid.
I now have to check which of the probabilities do occur... or maybe non of them occur.
How can I now check by which cause the character dies (if he even dies)? I need to put these probabilities in If conditions depending on each other.
Lets assume X1=35% , X2=60%, X3=80%.
Do I have to sum each probabilities?
100%-35%=65%
100%-60%=40%
100%-80%=20%
175% / 125% chance to die.
Thanks in advance!
I hope you know what I mean. It is hard to describe.