Actions provide you an easy way to define how an AI can complete a plan. Use them in cohesion with Decisions. For example, “Find Nearby Vantage Point” needs to be successful, so you would want to incorporate a check for nearby vantage points in the decision to ensure the Action is successful.
The last step of creating your AI is to create Actions for each of your Plans. If you need some help designing actions, take a look at the Designing Action page.
Let’s get started!
Creating a new action blueprint is incredibly simple.
- Open the Behaviour Tree for the AI you’re creating an Action for, then select “New Task”
- Search for “BTT_Action_Base”, then select it by left clicking.
- Your new Action is created!
The next part you’ll need to do is create the actual logic for your Action. When a task is called on the Behaviour Tree, the event “Event Receive Execute AI” is called. Use this event by right clicking in the event graph, and searching for it.
This is your starting point, everything within the Action depends on what you want to do with it. Remember that you have access to all AI systems, these are where they really help. If you’re confused on what to do, try taking a look at some of the examples provided with the pack, or checking out the Designing AI page here.
Once you’ve created your Action, all you need to do to use it is place it in the Behaviour Tree. Simply right click anywhere in your tree, search and select your Action, then drag from the top of the node to the bottom of the Plan, linking them together as shown below
That’s it! Make sure to adjust the settings of the Action if necessary by left clicking on it and viewing the details panel.
That’s it for creating AI!
The key to creating AI with VisAI is having a solid design before starting. Be sure to check out the examples in the pack, and ask questions in the Discord if you’re having troubles!
Next steps are to go out there and do it! If you have screenshots or something to share, all of us in the Discord community would love to see it!