BTEvaluateExpression
Inherits: BTAction < BTTask < BT
BT action that evaluates an Expression against a specified Node or Object.
Description
BTEvaluateExpression action evaluates an expression_string on the specified Node or Object instance and returns SUCCESS when the Expression executes successfully.
Returns FAILURE if the action encounters an issue during the Expression parsing or execution.
Properties
|
|
|
|
|
|
|
|
|
Array[BBVariant] |
|
|
|
|
Methods
Error |
parse() |
Property Descriptions
String expression_string = "" 🔗
void set_expression_string(value:
String)Stringget_expression_string()
The expression string to be parsed and executed.
Warning: Call parse after updating expression_string to update the internal Expression as it won’t be updated automatically.
bool input_include_delta = false 🔗
void set_input_include_delta(value:
bool)boolis_input_delta_included()
If enabled, the input variable delta will be added to input_names and input_values.
Warning: Call parse after toggling input_include_delta to update the internal Expression as it won’t be updated automatically.
PackedStringArray input_names = PackedStringArray() 🔗
void set_input_names(value:
PackedStringArray)PackedStringArrayget_input_names()
List of variable names within expression_string for which the user will provide values for through input_values.
Warning: Call parse after updating input_names to update the internal Expression as it won’t be updated automatically.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedStringArray for more details.
Array[BBVariant] input_values = [] 🔗
List of values for variables specified in input_names. The values are mapped to the variables by their array index.
Specifies the Node or Object instance containing the method to be called.
StringName result_var = &"" 🔗
void set_result_var(value:
StringName)StringNameget_result_var()
if non-empty, assign the result of the method call to the blackboard variable specified by this property.
Method Descriptions
Error parse() 🔗
Calls Expression.parse considering input_include_delta and input_names and returns its error code.