14.14 Check condition

This action event can be used to skip or repeat action events depending on the state of the specified condition. This action event is quite powerful as it allows you to realize loops as well as conditional executions of the action event lists.

To set up a condition check, you have to configure the following elements:

Operator
Specifies the operator to use for the condition check.

Type
Specifies the type of the condition check. This can be one of the following types:

Variable
Compare a variable against a value. In that case you will have to enter the name of the variable as well as the value to check this variable against below.

Language
Compare the current language against the one you have chosen in the listview below. Note that you can only use the operators "If equal to" and "If not equal to" with this type.

Object visibility
Check if the selected object is visible or invisible. Note that you can only use the operators "If equal to" (i.e. object is visible) and "If not equal to" (i.e. object is invisible) with this type.

Sound playing
Check if the sound that uses the specified identifier is currently playing. Note that you can only use the operators "If equal to" (i.e. sound is playing) and "If not equal to" (i.e. sound isn't playing) with this type.

Custom code
This is a special condition that will execute the custom code that you enter in the text entry widget below. Your custom code is expected to use Hollywood's Return() command to return a value. This value is then compared against the value you specify in the "Value" widget.

Name
This is only used if "Type" has been set to "Variable" or "Sound playing". In case you want to check the value of a variable, you have to enter its name here. Note that this can also be an expression like "x+1" or a function call etc. In case you want to check if a sound is playing, enter the sound's unique identifier here.

Value
This is only used if "Type" has been set to "Variable" or "Custom code". In that case you have to enter the value the variable or custom code result should be compared against here. Note that this can also be another variable, an expression like "x+1", a function call etc. If you want to compare the variable or custom code result against a string, you must enclose the value specified here in quotes.

Then
Here you have to set what should happen if the specified condition is true. This can be one of the following options:

Skip events
Select this mode to make Designer skip forward or backward in the current event list. If you enter a positive value here, Designer will skip the specified number of action events. For example, if you enter 1 here and the condition is true, Designer will skip the next action event after the "Check condition" event and jump directly to the event that comes after the next one. If you enter a negative value here, Designer will jump backwards. Specifying -1 here will repeat the "Check condition" event, specifying -2 will jump to the event that is before the "Check condition" event, -3 will jump back to two events before the "Check condition" event and so on.

Goto label
If you select this mode, Designer will jump to the specified label if the condition is true. You have to enter the label's name in the "Value" widget below. Note that labels must be local to the current event list. It's not possible to jump into a different action object from here. Also, like variable names label names are case insensitive. Using "Goto label" is probably more convenient than using "Skip events" because it's not necessary to adapt the skip offset when adding or removing action events.


Show TOC