What is a GOAP Agent?

Designing the Agent

When creating an agent, you need to first have a design. So let's choose a design. For simplicity sake, in this tutorial, we will assume the Agent already has a target and will omit it from the preconditions.

Agent: Soldier 
	- `HurtTarget`
	- Shoot
		- Preconditions: `InShootingRange`
		- Effects: `HurtPlayer` 
	- GoTo
		- Preconditions: `Not InShootingRange`
		- Effects: `InShootingRange`

Preview of What will be making

We will make a simple agent that follows a target and shoot it when it is within range.


In a new scene, add a new GameObject, name it Agent Soldier and add a cube as a child.


Add a BasicAgent component and then add a HurtTarget goal.


Under the AgentSoldier GameObject

  1. Create an empty GameObject and call it Actions