limboai/doc_classes/BTCooldown.xml

38 lines
2.1 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTCooldown" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that executes child only if [member cooldown] time passed since previous execution.
</brief_description>
<description>
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.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="cooldown_state_var" type="String" setter="set_cooldown_state_var" getter="get_cooldown_state_var" default="&quot;&quot;">
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.
</member>
<member name="duration" type="float" setter="set_duration" getter="get_duration" default="10.0">
Time to wait before child's another execution is allowed.
</member>
<member name="process_pause" type="bool" setter="set_process_pause" getter="get_process_pause" default="false">
Process cooldown time when [SceneTree] is paused.
</member>
<member name="start_cooled" type="bool" setter="set_start_cooled" getter="get_start_cooled" default="false">
Start on a cooldown, as if the child was executed before the first BT tick.
</member>
<member name="trigger_on_failure" type="bool" setter="set_trigger_on_failure" getter="get_trigger_on_failure" default="false">
Trigger cooldown, if the child returns [code]FAILURE[/code].
</member>
</members>
<constants>
</constants>
</class>