Math Help
#1

Hey, I need some help with math simply because I'm terrible at it. I need a way to make this system work out so the outcome with work somewhat according to the precentages, ect.

So, lets say I had a number (num_a). It has a 25% chance of doing a task (task_a). Now, we have a second number (num_b) that increases the chances of making that thing happen by 15%. Then, you have a number c (num_c) that is between 0 and 100. And depending on where that number is, it'll make the chances of task_a raise by x% depending on the value of num_c.

So, I'm wondering how this could all work together. Please respond if you have any input what so ever on the matter. If you need me to explain more I will be happy to do so.

Thanks.
Reply
#2

Cant you just use randoms?

Code:
new Random = random(3);
if(Random == 2)
{
  //25%
  new R2 = random(5); 
  if(R2 == 4)
  {
    //20%
    new r3 = random(100);
    new r4 = random(100);
    if(r4 >= r3)//Chooses a random percentage chance then a random # 
    {
     //Done
    }
  }
}
Not sure if this would work (Just guessing from what you said).

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)