Improve docs for CallMethod, ConsolePrint & Fail

This commit is contained in:
Serhii Snitsaruk 2023-10-19 14:11:08 +02:00
parent 81b415a6bf
commit cab9f853c0
3 changed files with 10 additions and 9 deletions

View File

@ -4,20 +4,20 @@
BT action that calls a method on a specified [Node] or [Object]. BT action that calls a method on a specified [Node] or [Object].
</brief_description> </brief_description>
<description> <description>
BTCallMethod calls a method on a specified [Node] or [Object] and returns [code]SUCCESS[/code]. BTCallMethod action calls a [member method] on the specified [Node] or [Object] instance and returns [code]SUCCESS[/code].
Returns [code]FAILURE[/code] if the action fails executing the method. Returns [code]FAILURE[/code] if the action encounters an issue during the method execution.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
<members> <members>
<member name="args" type="Array" setter="set_args" getter="get_args" default="[]"> <member name="args" type="Array" setter="set_args" getter="get_args" default="[]">
Arguments to pass to the method call. The arguments to be passed when calling the method.
</member> </member>
<member name="method" type="StringName" setter="set_method" getter="get_method" default="&amp;&quot;&quot;"> <member name="method" type="StringName" setter="set_method" getter="get_method" default="&amp;&quot;&quot;">
Method that will be called. The name of the method to be called.
</member> </member>
<member name="node" type="BBNode" setter="set_node_param" getter="get_node_param"> <member name="node" type="BBNode" setter="set_node_param" getter="get_node_param">
Parameter that will be used to get the node/object instance. Specifies the [Node] or [Object] instance containing the method to be called.
</member> </member>
</members> </members>
</class> </class>

View File

@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="BTConsolePrint" inherits="BTAction" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> <class name="BTConsolePrint" inherits="BTAction" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description> <brief_description>
BT action task that prints text to console. BT action task that outputs text to the console.
</brief_description> </brief_description>
<description> <description>
BT action task that prints text to console. Can contain placeholders for format arguments as in GDScript's % operator. BTConsolePrint action outputs text to the console and returns [code]SUCCESS[/code]. It can include placeholders for format arguments similar to GDScript's % operator.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
<members> <members>
<member name="bb_format_parameters" type="PackedStringArray" setter="set_bb_format_parameters" getter="get_bb_format_parameters" default="PackedStringArray()"> <member name="bb_format_parameters" type="PackedStringArray" setter="set_bb_format_parameters" getter="get_bb_format_parameters" default="PackedStringArray()">
The values of format parameters are used as format arguments for the text that will be printed.
</member> </member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;"> <member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
Text to print. Can contain multiple placeholders to be replaced with format arguments. Same as GDScript's % operator, placeholders start with '%' followed by a format specifier. For example: %s - string, %d - integer, %f - real. The text to be printed, which can include multiple placeholders to be substituted with format arguments. These placeholders follow the same format as GDScript's % operator and typically start with '%' followed by a format specifier. For instance: %s for string, %d for integer, %f for real.
</member> </member>
</members> </members>
</class> </class>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="BTFail" inherits="BTAction" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> <class name="BTFail" inherits="BTAction" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description> <brief_description>
BT action that returns FAILURE. BT action that always returns [code]FAILURE[/code].
</brief_description> </brief_description>
<description> <description>
</description> </description>