OrCondition ​
Inherits: Condition < Resource
A composite condition that passes if a specified number of its child conditions pass. This allows for flexible "N out of M" condition checking, including traditional OR logic.
Description ​
For example, with 3 conditions and min_required = 1, this behaves like a standard OR. With 3 conditions and min_required = 3, this behaves like a standard AND. With 3 conditions and min_required = 2, this passes if at least 2 conditions pass.
Properties ​
Array[Condition] | conditions | [] |
int | min_required | 1 |
Methods ​
void | set_system_hub( p_system_hub: GameHost.SystemHub ) |
bool | evaluate( argument: Variant = null ) |
String | get_description() |
String | get_function_description() |
bool | is_valid() |
String | get_expected_argument_type() |
Property descriptions ​
Composite Logic
Array[Condition] conditions = [] ​
Array of child conditions to check
int min_required = 1 ​
Minimum number of conditions that must be met for this condition to pass
Method descriptions ​
void set_system_hub( p_system_hub: GameHost.SystemHub ) ​
Gives the condition and its child conditions the hub of the game systems.
bool evaluate( argument: Variant = null ) ​
Checks if the required number of child conditions are met
String get_description() ​
A short text about what the condition checks.
String get_function_description() ​
The sentence the editor shows for the condition, with {placeholders} for its values.
bool is_valid() ​
Are the settings of the condition complete?
String get_expected_argument_type() ​
The kind of thing the condition is checked against (an entity, an encounter ...).