Confused how to do a Zombie?

OK what is the best way to write a Zombie character in Unreal.

A basic Zombie will avoid obstacles and walk toward the player character if it sees them or hears them.

Do I Start with ACharacter component or an AIComponent, do I need both, one as the controller one as the controlee?

And will it need a BrainComponent?? :rolleyes:

Zombies don’t have brain, they eat them.

From what I have been able to gather from the documentation so far (I am still new to Unreal Engine though do have experience in C++) Character and other classes like it (Pawn) are used to give a physical representation of a entity in the world. So you would use one of those to represent your zombie in your game world.

You would then also need a AIController to do the actual controlling of your zombie. The AIController is where you will place your AI code that controls the Character/Pawn representation of the zombie. A AIController is a non physical actor that can possess Pawn and it’s derived classes and control it’s actions.

So a good place to start would be to look into the Pawn class or one of it’s derived variations which will represent your zombie in the world and the AIController class which will actually control the zombie’s actions.

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AAIController/index.html

https://docs.unrealengine.com/latest/INT/Programming/Gameplay/Framework/Pawn/index.html
https://docs.unrealengine.com/latest/INT/Programming/Gameplay/Framework/Controller/index.html

OK So I have started working on this taking inspiration from the StratergyChar in the strategy example.

The way I think it will work is I have a Zombie which extends character, a ZombieSensor and a ZombieController.

But I’m not quite getting how to get the ZombieSensor’s detection of the PlayerCharacter and then passes that info to the ZombieController which can use path navigation to control the zombie to the target.

Thanks in advance.

One of the AI examples is the bots in ShooterGame. It uses the behavior tree and blackboard you probably find more information there.