MATH AND Stadistic Question

Aiden

Member
Reaction score
0
Im trying to do random event ... you know more random
AND IN A Easy easy way.
Reading this forum, someone think in this:
Trigger:
  • First
    • Conditions
      • <b>(Random integer number between 1 and 2) Equal to 1</b>
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
    • <b> (Random integer number between 1 and 20) Equal to 10</b>
      • Then - Actions
        • Item - Create Healing Salve at Temp_Point
      • Else - Actions
        • Do nothing

But my question its this:
Chance 1 in 2 is ... 50%
Then if you got it
Chance 1 in 20 is 5 %

So the REAL %
For something in this trigger happens its?

May be this?:
0,5 x 0,05 = 0,025
 

Sevion

The DIY Ninja
Reaction score
413
First, I want to just say that the trigger formatting you did is neigh on impossible to read.

Second off, just store the percent chance you want in a real array and then just do an if-then to check if a randomly generated integer/real (from 1 to 100) divided by 100 is equal to or less than the percent chance you have stored. If it is, do what you want.

Also, don't use Do nothing. It does exactly what it says. Nothing. It's better to leave it blank as having Do nothing there actually insinuates a call to a function which decreases efficiency. In short, don't use Do Nothing.
 

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
>May be this?:
0,5 x 0,05 = 0,025

Yea I think you are right. I guess it's the same as having two dice and trying to roll 2 6s
the first 6's chance is 1 / 6 and the second is 1 / 6 but double 6s is only 1 / 36 = 1 / 6 * 1 / 6.

I guess rolling double 6s i more likely then this (1 / 40 < 1 / 36)
 

drol

New Member
Reaction score
7
Im trying to do random event ... you know more random
AND IN A Easy easy way.
Reading this forum, someone think in this:
Trigger:
  • First
    • Conditions
      • <b>(Random integer number between 1 and 2) Equal to 1</b>
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
    • <b> (Random integer number between 1 and 20) Equal to 10</b>
      • Then - Actions
        • Item - Create Healing Salve at Temp_Point
      • Else - Actions
        • Do nothing

But my question its this:
Chance 1 in 2 is ... 50%
Then if you got it
Chance 1 in 20 is 5 %

So the REAL %
For something in this trigger happens its?

May be this?:
0,5 x 0,05 = 0,025

You're right, but I doubt it will be more "random" doing 2x 0,05 than it is to just do 0,025 chance.
 

Aiden

Member
Reaction score
0
First, I want to just say that the trigger formatting you did is neigh on impossible to read.

Second off, just store the percent chance you want in a real array and then just do an if-then to check if a randomly generated integer/real (from 1 to 100) divided by 100 is equal to or less than the percent chance you have stored. If it is, do what you want.

Also, don't use Do nothing. It does exactly what it says. Nothing. It's better to leave it blank as having Do nothing there actually insinuates a call to a function which decreases efficiency. In short, don't use Do Nothing.
uhmmm? what?
1 from 10 its 10% chance, you dont need to do that.
 

Aiden

Member
Reaction score
0
You're right, but I doubt it will be more "random" doing 2x 0,05 than it is to just do 0,025 chance.
Testing a lot my map i concloud exist some secuence for random issues.
so if you just used :
Chance 1 in 40 is ... 5% you will see some secuence.
but if you use more condition for that event, the trigger actually more random.
I guesss..
 

MP®

Member
Reaction score
11
Testing a lot my map i concloud exist some secuence for random issues.
so if you just used :
Chance 1 in 40 is ... 5% you will see some secuence.
but if you use more condition for that event, the trigger actually more random.
I guesss..

It shouldnt make a difference.. Think the sequence you saw, is just accidentally.

OR:

You should have check the box 'fixed random seeds' off @ world editor preferences if you test it! If you dont, the random number will be the same every time
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top