Files
2026-10-15 16:30:44 +08:00

159 lines
11 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<1232> BTRandomSequence
<1233> BT composite that executes tasks in random order as long as they return <1/>.
<1234> BTRandomSequence executes its child tasks in a random order as long as they return <1/>. If a child task results in <2/>, BTRandomSequence will immediately execute the next child task until one of them returns <3/> or all of them result in <4/>.
<1235> Returns <1/> if a child task results in <2/>. BTRandomSequence will remember the execution order and the last child task that returned <3/>, ensuring it resumes from that point in the next tick.
<1236> BTRandomWait
<1237> BT action that waits for a randomized duration to elapse and then returns <1/>.
<1238> BTRandomWait action waits for a randomized duration to elapse and then returns <1/>. The duration is randomized within the specified range, defined by <l2>min_duration</l> and <l3>max_duration</l>.
<1239> <l1>max_duration</l>
<1240> <l1>min_duration</l>
<1241> <1/> <b>max_duration</b> = <2/> <l3>🔗</l>
<1242> <1/> <b>set_max_duration</b>(value: <2/>)
<1243> <1/> <b>get_max_duration</b>()
<1244> Maximum duration for the wait.
<1245> <1/> <b>min_duration</b> = <2/> <l3>🔗</l>
<1246> <1/> <b>set_min_duration</b>(value: <2/>)
<1247> <1/> <b>get_min_duration</b>()
<1248> Minimum duration for the wait.
<1249> BTRepeat
<1250> BT decorator that repeats its child a specified number of <l1>times</l>.
<1251> BTRepeat iterates its child task a specified number of times, as defined by <l1>times</l>. If <l2>forever</l> is <3/>, the child’s execution will be repeated indefinitely.
<1252> Returns <1/> if the child task results in <2/>. If <l3>forever</l> is <4/>, BTRepeat will always return <5/>.
<1253> Returns <1/> if the specified number of successful executions is reached. If <l2>abort_on_failure</l> is <3/>, a <4/> status returned by the child is also considered a successful execution.
<1254> Returns <1/> if the child task results in <2/> when <l3>abort_on_failure</l> is <4/>.
<1255> <l1>abort_on_failure</l>
<1256> <l1>forever</l>
<1257> <l1>times</l>
<1258> <1/> <b>abort_on_failure</b> = <2/> <l3>🔗</l>
<1259> If <1/>, <2/> status returned by the child task is also considered as a successful execution.
<1260> <1/> <b>forever</b> = <2/> <l3>🔗</l>
<1261> <1/> <b>set_forever</b>(value: <2/>)
<1262> <1/> <b>get_forever</b>()
<1263> If <1/>, the child’s execution will be repeated indefinitely, always returning <2/>.
<1264> <1/> <b>times</b> = <2/> <l3>🔗</l>
<1265> <1/> <b>set_times</b>(value: <2/>)
<1266> <1/> <b>get_times</b>()
<1267> The number of times to repeat execution of the child task.
<1268> BTRepeatUntilFailure
<1269> BT decorator that repeats its child task until <1/>.
<1270> BTRepeatUntilFailure repeats its child task until it results in <1/>.
<1271> Returns <1/> if the child task results in <2/> or <3/>.
<1272> Returns <1/> if the child task results in <2/>.
<1273> BTRepeatUntilSuccess
<1274> BT decorator that repeats its child task until <1/>.
<1275> BTRepeatUntilSuccess repeats its child task until it results in <1/>.
<1276> Returns <1/> if the child task results in <2/> or <3/>.
<1277> Returns <1/> if the child task results in <2/>.
<1278> BTRunLimit
<1279> BT decorator that restricts the execution of its child a limited number of times.
<1280> BTRunLimit restricts the execution of the child task to a maximum number of times, defined by <l1>run_limit</l>.
<1281> Returns <1/> if the limit on executions is exceeded; otherwise, it returns the status of the child task.
<1282> <l1>CountPolicy</l>
<1283> <l1>count_policy</l>
<1284> <l1>run_limit</l>
<1285> enum <b>CountPolicy</b>: <l1>🔗</l>
<1286> <l1>CountPolicy</l> <b>COUNT_SUCCESSFUL</b> = <2/>
<1287> Count only successful runs towards the limit.
<1288> <l1>CountPolicy</l> <b>COUNT_FAILED</b> = <2/>
<1289> Count only failed runs towards the limit.
<1290> <l1>CountPolicy</l> <b>COUNT_ALL</b> = <2/>
<1291> Count successful and failed runs towards the limit.
<1292> <l1>CountPolicy</l> <b>count_policy</b> = <2/> <l3>🔗</l>
<1293> <1/> <b>set_count_policy</b>(value: <l2>CountPolicy</l>)
<1294> <l1>CountPolicy</l> <b>get_count_policy</b>()
<1295> Which runs should be counted towards the limit: successful, failed, or all?
<1296> <1/> <b>run_limit</b> = <2/> <l3>🔗</l>
<1297> <1/> <b>set_run_limit</b>(value: <2/>)
<1298> <1/> <b>get_run_limit</b>()
<1299> The maximum number of times the child is permitted to be executed.
<1300> BTSelector
<1301> BT composite that sequentially executes tasks until first <1/>.
<1302> BTSelector executes its child tasks sequentially, from first to last, until any child returns <1/>. If a child task results in <2/>, BTSelector will immediately execute the next child task until one of them returns <3/> or all of them result in <4/>. BTSelector and <l5>BTSequence</l> are two of the most common building blocks of behavior trees. Essentially, while <l6>BTSequence</l> is similar to a boolean AND operation, BTSelector is similar to a boolean OR operation. Selectors enable the behavior tree to respond to changes in the environment and trigger transitions between various fallback behaviors.
<1303> Returns <1/> if a child task results in <2/>. BTSelector will remember the last child task that returned <3/>, ensuring it resumes from that point in the next execution tick.
<1304> BTSequence
<1305> BT composite that sequentially executes tasks as long as they return <1/>.
<1306> BTSequence executes its child tasks sequentially, from first to last, as long as they return <1/>. If a child task results in <2/>, BTSequence will immediately execute the next child task until one of them returns <3/> or all of them result in <4/>. BTSequence and <l5>BTSelector</l> are two of the most common building blocks of behavior trees. Essentially, while <l6>BTSelector</l> is similar to a boolean OR operation, BTSequence is similar to a boolean AND operation. Sequences enable the behavior tree to compose complex behaviors from a chain of simpler tasks.
<1307> Returns <1/> if any child task results in <2/>. BTSequence will remember the last child task that returned <3/>, ensuring it resumes from that point in the next execution tick.
<1308> BTSetAgentProperty
<1309> BT action that assigns a value to the specified agent’s property.
<1310> BTSetAgentProperty assigns the specified <l1>value</l> to the agent’s property identified by the <l2>property</l> and returns <3/>. Optionally, it can perform a specific <l4>operation</l> before assignment.
<1311> Returns <1/> if it fails to set the property.
<1312> <l1>Operation</l>
<1313> <l1>operation</l>
<1314> <l1>property</l>
<1315> <l1>value</l>
<1316> <l1>Operation</l> <b>operation</b> = <2/> <l3>🔗</l>
<1317> <1/> <b>set_operation</b>(value: <l2>Operation</l>)
<1318> <l1>Operation</l> <b>get_operation</b>()
<1319> Specifies the operation to be performed before assignment. Operation is executed as follows:
<1320> <1/> <b>property</b> = <2/> <l3>🔗</l>
<1321> Parameter that specifies the agent’s property name.
<1322> <l1>BBVariant</l> <b>value</b> <l2>🔗</l>
<1323> Parameter that specifies the value that will be assigned to agent’s property.
<1324> BTSetVar
<1325> BT action that assigns <l1>value</l> to the <l2>variable</l> and then returns <3/>.
<1326> BTSetVar assigns <l1>value</l> to the <l2>variable</l> and then returns <3/>. Optionally, it can perform a specific <l4>operation</l> before assignment.
<1327> Returns <1/> if it fails to set the <l2>variable</l>.
<1328> <l1>operation</l>
<1329> <l1>value</l>
<1330> <l1>variable</l>
<1331> <l1>Operation</l> <b>operation</b> = <2/> <l3>🔗</l>
<1332> <l1>BBVariant</l> <b>value</b> <l2>🔗</l>
<1333> Parameter that specifies the value to be assigned to the variable.
<1334> <1/> <b>variable</b> = <2/> <l3>🔗</l>
<1335> Name of the variable to which the value will be assigned.
<1336> BTStopAnimation
<1337> BT action that stops the playback of an animation on the specified <1/> node.
<1338> BTStopAnimation action stops the playback of an animation on the specified <1/> node and returns <2/>. If <l3>animation_name</l> is set, it will only stop the playback if the specified animation is currently playing.
<1339> <l1>animation_name</l>
<1340> <l1>animation_player</l>
<1341> <l1>keep_state</l>
<1342> <1/> <b>animation_name</b> = <2/> <l3>🔗</l>
<1343> Animation’s key within the <1/> node. If not empty, BTStopAnimation will only stop the playback if the specified animation is currently playing.
<1344> <l1>BBNode</l> <b>animation_player</b> <l2>🔗</l>
<1345> <1/> <b>keep_state</b> = <2/> <l3>🔗</l>
<1346> <1/> <b>set_keep_state</b>(value: <2/>)
<1347> <1/> <b>get_keep_state</b>()
<1348> If <1/>, the animation state is not updated visually.
<1349> BTSubtree
<1350> <b>Inherits:</b> <l1>BTNewScope</l> <b><</b> <l2>BTDecorator</l> <b><</b> <l3>BTTask</l> <b><</b> <l4>BT</l>
<1351> BT decorator that instantiates and runs a subtree within the larger tree.
<1352> BTSubtree instantiates a <l1>BehaviorTree</l> and includes its root task as a child during initialization, while also creating a new <l2>Blackboard</l> scope.
<1353> Returns the status of the subtree’s execution.
<1354> Subtree blackboard variables can be mapped to the main tree blackboard plan variables. Check out mapping section in the inspector.
<1355> Note: BTSubTree is designed as a simpler loader, and does not support updating <l1>subtree</l> at runtime. A custom subtree decorator is better suited:
<1356> This allows for the <l1>BehaviorTree</l> to load a specific behavior tree from a variable in the blackboard, or from some other location, and use that new behavior tree at runtime.
<1357> <l1>subtree</l>
<1358> <l1>BehaviorTree</l> <b>subtree</b> <l2>🔗</l>
<1359> <1/> <b>set_subtree</b>(value: <l2>BehaviorTree</l>)
<1360> <l1>BehaviorTree</l> <b>get_subtree</b>()
<1361> A <l1>BehaviorTree</l> resource that will be instantiated as a subtree.
<1362> BTTimeLimit
<1363> BT decorator that sets a time limit for its child’s execution.
<1364> BTTimeLimit allocates a limited time for the child’s execution and aborts it, returning <1/> if the <l2>time_limit</l> is exceeded.
<1365> Returns <1/> if the <l2>time_limit</l> is exceeded; otherwise, it returns the status of the child task.
<1366> <l1>time_limit</l>
<1367> <1/> <b>time_limit</b> = <2/> <l3>🔗</l>
<1368> <1/> <b>set_time_limit</b>(value: <2/>)
<1369> <1/> <b>get_time_limit</b>()
<1370> Time allocated for the child task’s execution.
<1371> BTWait
<1372> BT action that waits for a specified <l1>duration</l> to elapse and then returns <2/>.
<1373> <l1>duration</l>
<1374> <1/> <b>duration</b> = <2/> <l3>🔗</l>
<1375> There is currently no description for this property. Please help us by contributing one!
<1376> BTWaitTicks
<1377> BT action that waits for a specified number of ticks to elapse and then returns <1/>.
<1378> <l1>num_ticks</l>
<1379> <1/> <b>num_ticks</b> = <2/> <l3>🔗</l>
<1380> <1/> <b>set_num_ticks</b>(value: <2/>)
<1381> <1/> <b>get_num_ticks</b>()
<1382> The number of ticks to wait before returning <1/>.
<1383> LimboUtility
<1384> Helper functions for LimboAI.
<1385> <l1>decorate_output_var</l>(variable: <2/>) <3/>
<1386> <l1>decorate_var</l>(variable: <2/>) <3/>
<1387> <l1>get_check_operator_string</l>(check: <l2>CheckType</l>) <3/>
<1388> <l1>get_operation_string</l>(operation: <l2>Operation</l>) <3/>
<1389> <l1>get_status_name</l>(status: <2/>) <3/>
<1390> <l1>get_task_icon</l>(class_or_script_path: <2/>) <3/>