Do action if percentage = correct



  • I'm looking to do action about 5% of the times and I've been using random number generator and then match 1 number of all numbers, and if it matches that number do the action but it feels like it matches it too many times to be correct.

    Is there any way to use proper percentage in BAS?



  • actually found what i was doing wrong, couldn't use match with this had to do [[number]] == [correctnumber]]



  • @rekaa0251 said in Do action if percentage = correct:

    I'm looking to do action about 5% of the times and I've been using random number generator and then match 1 number of all numbers, and if it matches that number do the action but it feels like it matches it too many times to be correct.

    Is there any way to use proper percentage in BAS?

    Set the action "Random Number" from 0 to 100
    0_1558528999309_ce49e4f6-2027-4beb-9015-5e4f35a15803-изображение.png

    And write the condition [[RANDOM_NUMBER]] > 95. The chance of triggering the condition will be 5%.

    0_1558529096305_0501b9ad-c9f3-4690-ab8d-515640e648ce-изображение.png

    test script



  • @fox That was a smart solution! Thanks man


Log in to reply
 

  • 3
  • 4
  • 3
  • 4
  • 4
  • 1
  • 2
  • 6