limboai/doc_classes/BTEvaluateExpression.xml

44 lines
2.8 KiB
XML
Raw Permalink Normal View History

2024-02-17 21:00:25 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTEvaluateExpression" inherits="BTAction" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT action that evaluates an [Expression] against a specified [Node] or [Object].
</brief_description>
<description>
BTEvaluateExpression action evaluates an [member expression_string] on the specified [Node] or [Object] instance and returns [code]SUCCESS[/code] when the [Expression] executes successfully.
Returns [code]FAILURE[/code] if the action encounters an issue during the [Expression] parsing or execution.
</description>
<tutorials>
</tutorials>
<methods>
<method name="parse">
<return type="int" enum="Error" />
<description>
Calls [method Expression.parse] considering [member input_include_delta] and [member input_names] and returns its error code.
</description>
</method>
</methods>
<members>
<member name="expression_string" type="String" setter="set_expression_string" getter="get_expression_string" default="&quot;&quot;">
The expression string to be parsed and executed.
[b]Warning:[/b] Call [method parse] after updating [member expression_string] to update the internal [Expression] as it won't be updated automatically.
</member>
<member name="input_include_delta" type="bool" setter="set_input_include_delta" getter="is_input_delta_included" default="false">
If enabled, the input variable [code]delta[/code] will be added to [member input_names] and [member input_values].
[b]Warning:[/b] Call [method parse] after toggling [member input_include_delta] to update the internal [Expression] as it won't be updated automatically.
</member>
<member name="input_names" type="PackedStringArray" setter="set_input_names" getter="get_input_names" default="PackedStringArray()">
List of variable names within [member expression_string] for which the user will provide values for through [member input_values].
[b]Warning:[/b] Call [method parse] after updating [member input_names] to update the internal [Expression] as it won't be updated automatically.
</member>
<member name="input_values" type="BBVariant[]" setter="set_input_values" getter="get_input_values" default="[]">
List of values for variables specified in [member input_names]. The values are mapped to the variables by their array index.
</member>
<member name="node" type="BBNode" setter="set_node_param" getter="get_node_param">
Specifies the [Node] or [Object] instance containing the method to be called.
</member>
2024-03-04 15:14:47 +00:00
<member name="result_var" type="StringName" setter="set_result_var" getter="get_result_var" default="&amp;&quot;&quot;">
2024-02-17 21:00:25 +00:00
if non-empty, assign the result of the method call to the blackboard variable specified by this property.
</member>
</members>
</class>