Author Topic: Is it possible to add a random chance to cause profile switching?  (Read 763 times)

jablesXtreme

  • Guest
At the end of my command sequence I would like to add a 0.5% chance to switch to "profile 2", a 1% chance to switch to "profile 3", a 10% chance to switch to "profile 4", and an 88.5% chance for nothing to happen.

To be honest I'm way too dumb to understand how to configure many parts of this software. If anybody could spoon feed me some help it would be appreciated. Thanks.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4760
  • RTFM
Re: Is it possible to add a random chance to cause profile switching?
« Reply #1 on: December 27, 2019, 08:03:08 PM »
If by "command sequence" you mean you want to add this to one or more specific commands, adding these actions at the bottom of the action list should do what you're describing:

Code: [Select]
Set decimal [~rand] value as random from 0 to 1
Begin Decimal Compare : [~rand] Is Less Than 0.0050
    Switch to profile, 'profile 2'
Else If Decimal Compare : [~rand] Is Less Than 0.01000
    Switch to profile, 'profile 3'
Else If Decimal Compare : [~rand] Is Less Than 0.1000
    Switch to profile, 'profile 4'
End Condition

jablesXtreme

  • Guest
Re: Is it possible to add a random chance to cause profile switching?
« Reply #2 on: December 27, 2019, 10:45:16 PM »
If by "command sequence" you mean you want to add this to one or more specific commands, adding these actions at the bottom of the action list should do what you're describing:

Code: [Select]
Set decimal [~rand] value as random from 0 to 1
Begin Decimal Compare : [~rand] Is Less Than 0.0050
    Switch to profile, 'profile 2'
Else If Decimal Compare : [~rand] Is Less Than 0.01000
    Switch to profile, 'profile 3'
Else If Decimal Compare : [~rand] Is Less Than 0.1000
    Switch to profile, 'profile 4'
End Condition

Thanks alot! It works just as I imagined.