You may have noticed in addition to the variables we didn't cover yet, that our tank has no logic in place for moving. This can be easily handled with a substate machine, which is a state machine within a state. This may sound confusing at first, but we can easily break down the Patrol state into substates. In our example, the Patrol state will be in one of the two substates—moving to the current waypoint or finding the next waypoint. A waypoint is essentially a destination for our agent to move toward. In order to make these changes, we'll need to go into our state machine again.
First, create a substate by clicking on an empty area on the canvas and then selecting Create Sub-State Machine. Since we already have ...