# First Steps: Give Two Actors Opposing Factions

> For the complete documentation index, see [llms.txt](llms.txt).

Give a player and a zombie different teams, then ask how each sees the other. Start with a playable character, an enemy character, and the Simple Attitude Check solver from [Set Up Ninja Factions](fct-setup.html).

Procedure: Create the two factions

1. In the faction folder you registered, right-click and choose Ninja Bear Studio → Ninja Factions → Faction. Name the asset Players, set its display name to Players, choose `Factions.ID.Players` as its Faction Tag, and set Team ID to `1`. Keep its attitude toward its own faction Friendly and toward other factions Neutral.

2. Create a second faction named Zombies. Give it the tag `Factions.ID.Enemies.Zombies` and team ID `10`. Add the tag in Project Settings → Gameplay Tags if needed. Set its attitude toward its own faction to Neutral and toward other factions to Hostile. Leave both attitude matrices empty.

Players:
![Players faction with team ID 1](Documentation/fct_faction_players.png)

Zombies:
![Zombies faction with team ID 10](Documentation/fct_faction_zombies.png)

Procedure: Give each character a starting team

1. Add a Faction Component to the characters' shared base Blueprint, or to each character if they have separate bases.

2. On the player's component, add Players under Default Factions. Check Main Faction and leave reputation at zero. Do the same on the zombie, choosing Zombies.

3. For a standalone AI that uses Unreal's team and perception system, select `NinjaFactionAIController` as the zombie's AI Controller Class and enable Auto Possess AI for placed or spawned actors. Set the active Game Mode's Player Controller Class to `NinjaFactionPlayerController` or your subclass. If you already use a Ninja Bot controller, follow [Bot and Factions](integration-bot-factions.html) for that part.

## Try It in Play

1. Place a zombie in the level. In the Level Blueprint, create a reference to it and use Get Player Pawn for the player.

2. From a test event you can trigger after both have spawned, call the Faction Function Library's Get Attitude. Connect the zombie to Source and the player to Target. Print the Attitude output. Expect Hostile.

3. Swap the pins and trigger the event again. Expect Neutral because Players treats other factions as neutral. To make the hostility mutual, change Players' attitude toward Zombies with an [attitude matrix](fct-reputation-tiers.html#give-one-faction-an-exception).

If both checks return Neutral, call Get Main Faction on each actor. Check that the results are Zombies and Players and that Simple Attitude Check is selected.

## Next Steps

[Recruit a character during play](fct-manage-memberships.html) or [use the attitude in an AI tree](fct-bots.html).

