limboai/doc_classes/BTCooldown.xml

34 lines
2.1 KiB
XML
Raw Permalink Normal View History

2022-11-01 20:31:22 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-04-10 14:57:36 +00:00
<class name="BTCooldown" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
2022-11-01 20:31:22 +00:00
<brief_description>
2022-11-04 12:27:09 +00:00
BT decorator that executes child only if [member cooldown] time passed since previous execution.
2022-11-01 20:31:22 +00:00
</brief_description>
<description>
2022-11-04 12:27:09 +00:00
BT decorator that executes child only if [member cooldown] time passed since previous child task execution.
Returns [code]RUNNING[/code], when the child returns [code]RUNNING[/code].
Returns [code]SUCCESS[/code], when the child returns [code]SUCCESS[/code], and triggers the cooldown.
Returns [code]FAILURE[/code], if the child returns [code]FAILURE[/code] or [member cooldown] time didn't pass since previous execution.
2022-11-01 20:31:22 +00:00
</description>
<tutorials>
</tutorials>
<members>
<member name="cooldown_state_var" type="String" setter="set_cooldown_state_var" getter="get_cooldown_state_var" default="&quot;&quot;">
2022-11-04 12:27:09 +00:00
Boolean variable to save cooldown state in the [Blackboard]. If empty, the variable will be automatically created and assigned.
If variable value is [code]true[/code], the cooldown is triggered.
Useful to check on cooldown state at a different place in the tree or to share a cooldown state between different parts of the behavior tree.
2022-11-01 20:31:22 +00:00
</member>
<member name="duration" type="float" setter="set_duration" getter="get_duration" default="10.0">
2022-11-04 12:27:09 +00:00
Time to wait before child's another execution is allowed.
2022-11-01 20:31:22 +00:00
</member>
<member name="process_pause" type="bool" setter="set_process_pause" getter="get_process_pause" default="false">
2022-11-04 12:27:09 +00:00
Process cooldown time when [SceneTree] is paused.
2022-11-01 20:31:22 +00:00
</member>
<member name="start_cooled" type="bool" setter="set_start_cooled" getter="get_start_cooled" default="false">
2022-11-04 12:27:09 +00:00
Start on a cooldown, as if the child was executed before the first BT tick.
2022-11-01 20:31:22 +00:00
</member>
<member name="trigger_on_failure" type="bool" setter="set_trigger_on_failure" getter="get_trigger_on_failure" default="false">
2022-11-04 12:27:09 +00:00
Trigger cooldown, if the child returns [code]FAILURE[/code].
2022-11-01 20:31:22 +00:00
</member>
</members>
</class>