Advanced Conditions



In this section we are going to describe the advanced commands that are in the Condition tab of the command panel. All of these commands will open a block captioned by the command. You can see the block as a green box on your command list. The command that opens the block will refer to a condition, and all the commands you put inside the block will only be executed if the condition referred by the opening block command is met.



In all of these commands (except for the repeat command) you will have the option to check a checkbox labeled 'Not'. If this option is selected, the block that opens the command will be executed only if the condition referred by the command is not met.



If a variable has value

This command will open a block that will be executed depending on the result of a variable comparison. You have to introduce a variable to compare, a value or a second variable to compare the variable to, and select a comparison operation from the droplist that can be equal to, smaller than, larger than, smaller or equal to and larger or equal to. You can use variables that contains text values to be compared, and the smaller and larger operations will be met if the value contained in the variable is alphabetically lower and higher respectively. If you are going to compare a variable containing text, and you aren't going to compare it against other variable, you have to select the checkbox labeled 'Interpret value as text', and input a text in the value field.



If an expression is true

In this command you have to introduce a valid groovy boolean expression, and it will open a block that will be executed if the given expression is evaluated true.



If a timer reaches a number of seconds

This command will open a block that will be executed if a specified timer has reached a specified number of seconds since it was set. It's not mandatory to stop the timer before executing this command, but you must at least have set it before.



If a data value is

This command is very similar to the above command If a variable has value, but instead of comparing a variable to a value it compares a stored data value with some value. You must specify if the data value is numeric, decimal (numeric but it can contain a period and a decimal part), or a text value.



Repeat

This command will open a block, but instead of being executed if a condition is met, it will be executed a specified number of times. So all commands you add inside this block will be repeatedly executed the given amount of times. You can if you want, in place of specifying a number of times, to repeat the block while a boolean groovy expression is evaluated true. If you choose that last option you will have to specify the boolean groovy expression instead of the number of times, and the block will be executed repeatedly until the given expression is evaluated false. Take care and make sure the expression is going to evaluate false at some moment, or you will create an infinite loop and SexScripts is going to freeze when executing your script and arrive to that command.



return to the contents page