Don't Walk By - 6

Don't Walk By - 6

Feb 27, 2020. | By: Evan Diamond
1 min

The sixth CGD blog post about Don’t Walk By

Overview

This week I just added a added more State Info functionality to the Ai script. As well as implementing the service pawn ai.

State Info

I initially added a SetStateInfo function to the ai which would allow users to set the ai’s state which would call it’s respective functions to start performing the state’s behavior. This is useful for other systems that affect the ai and need to revert their state once they’re done (such as the puddle). I then updated this system further by making a RevertState function. Now the ai store whatever state they’re in when they’re told to swap states. Then when RevertState is called the ai uses SetStateInfo with their currently stored state to go back their previous state.

Service Pawn

The service pawn is a pawn that is linked to the phone ability. When the phone ability is used a service pawn will appear and path to to whatever hazard is being affected by the phone, then wait by the hazard (clearing it) before going back to where it came from. The service pawn can be in three states:

  1. Moving Towards - the pawn is moving towards the hazard
  2. Servicing - the pawn is waits by the hazard
  3. Moving away - the pawn is moving back to where it spawned

Using the path to point and stationary functionality of the ai I implemented these behaviors. A service pawn is spawned in using the SpawnServicePawn in the PawnManager script.

WEE WOO

About

Gamers developing new games.

Social Links

Our Bunker

University of the West of England,
Frenchay Campus, Bristol, BS16 1QY,
United Kingdom.