Going through a game alone is seldom any fun. We're social creatures so we enjoy the company of others. What better way to celebrate this than by creating a group of companions to follow us along on our journey? In this chapter, we'll explore how to create a small party of companions who spawn at our location and reap the rewards of our adventure!
Start by having your IDE open and ready to make some changes. We won't have to create any new classes, but we will alter the behavior of our existing ones by adding some functions.
SpawnDefaultFor()function in our
TutorialGameclass. Once we spawn our default pawn,
PlayerSpawned()in our player controller is to be ...