Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 1.62 KB

index.md

File metadata and controls

19 lines (13 loc) · 1.62 KB

Tutorial 2: Sequence node

Description

Use the sequence node to chain actions.

Building the sequence in the behavior tree

In the "Tutorials" behavior tree that you previously created, drag the sequence node () to the canvas, just above the "Say" action so that the sequence node becomes the parent of the action node. Drag another action node on the left of the "Say" action to have the following behavior tree: example 2 Set the leftmost action properties as described below: prompt action This "Prompt" action displays a pop-up window with an input field. On submission, the agent knowledge will be updated with the value of the input stored under the key "answer". Now you can use this as an input for your "Say" action. Simply double-click on it, and replace the type of the message input by "Agent knowledge" and the value by "answer". say action

Go to the tutorial page: once connected to craft ai services, you will be prompted for a message to display. If you enter "Hi!" and hit "submit", the web page will display "Agent 0 says: Hi!", and the pop-up will reappear and so on.

You can take a look at the expected result by running the application with bts/2 as the behaviors folder.