Skip to content

Commit

Permalink
Demo: Tweak descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
limbonaut committed Feb 14, 2024
1 parent e09928f commit 8a226a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo/demo/ai/tutorial_trees/tutorial_04_sequence.tres
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ duration = 888.0
children = [SubResource("BTPlayAnimation_rsejo"), SubResource("BTWait_dl31p"), SubResource("BTPlayAnimation_wsspf"), SubResource("BTAction_fc1oo"), SubResource("BTAction_djl5v"), SubResource("BTFail_i2f36"), SubResource("BTComment_4i06i"), SubResource("BTWait_yxpnx")]

[resource]
description = "The [comp]Sequence[/comp] is one of the core composite tasks. It executes its children sequentially, from first to last, until one of them returns [FAILURE], or all of them result in [SUCCESS]. In other words, if any child task results in [FAILURE], the Sequence execution will be aborted, and the Sequence itself will return [FAILURE].
description = "The [comp]Sequence[/comp] is one of the core composite tasks. It executes its child tasks sequentially, from first to last, until one of them returns [FAILURE], or all of them result in [SUCCESS]. In other words, if any child task results in [FAILURE], the Sequence execution will be aborted, and the Sequence itself will return [FAILURE].
In our example, you can observe a simple [comp]Sequence[/comp] in action. Notice how it fails when it reaches the [act]Fail[/act] action and never proceeds to the [act]Wait 888 sec[/act] action afterward. By the way, the simple [act]Fail[/act] task is quite useful for troubleshooting. Its sole function is to return [FAILURE].
"
Expand Down
2 changes: 1 addition & 1 deletion demo/demo/ai/tutorial_trees/tutorial_05_selector.tres
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ output_var = "target"
children = [SubResource("BTSequence_cgwor"), SubResource("BTSequence_vx4uy"), SubResource("BTAction_2murg")]

[resource]
description = "The [comp]Selector[/comp] is another essential composite task. It executes its children sequentially, from first to last, until one of them returns [SUCCESS] or all of them result in [FAILURE]. In other words, when a child task results in [FAILURE], it moves on to the next one until it finds the one that returns [SUCCESS]. Once a child task results in [SUCCESS], the Selector stops and also returns [SUCCESS].
description = "The [comp]Selector[/comp] is another essential composite task. It executes its child tasks sequentially, from first to last, until one of them returns [SUCCESS] or all of them result in [FAILURE]. In other words, when a child task results in [FAILURE], it moves on to the next one until it finds the one that returns [SUCCESS]. Once a child task results in [SUCCESS], the Selector stops and also returns [SUCCESS].
To understand the [comp]Selector[/comp], it helps to see it as the opposite of the [comp]Sequence[/comp]. While the Sequence continues iterating over children as long as they return [SUCCESS], the Selector does the same but as long as they return [FAILURE]. The purpose of the Selector is to find a child that succeeds. It's often useful to place higher priority tasks at the top so that the Selector attempts them first.
Expand Down

0 comments on commit 8a226a1

Please sign in to comment.