Hello! I have been looking trough Youtube to find a tutorial for a team system for my Hero Shooter game, but didn’t find any. I also have no idea on how I could do one from scratch.
(Simple Team A and Team B idea)
If you have any tips and tricks, or know a tutorial, I’d appreciate it a lot!
There is already a team system integrated . If I remember correctly if they are not in the same group you can consider as enemy. However you can also assign 1 as natural (I just can’t find where I did now but its possible)
0-AI
1-Natural
2-Player
2 is enemy to 0,1
This should also have a BP node, drag a pin from controller and search team should be there.
However if you are looking for something more grift system design let me know.
If you implement the IGenericTeamInterface you can get set ids on runtime thus you can do switches however as far as i remember there was no events, so advice to make a OnFactionChanged event something to bind other systems.
Something happens on combat, you cast a spell to enemy “mind control” ai becomes friendly to your team.
#include "GenericTeamAgentInterface.h"
UCLASS()
class MGPLAYERCHARACTER_API AMGPlayerController : public APlayerController, public IGenericTeamAgentInterface
{
GENERATED_BODY()
public:
AMGPlayerController(const FObjectInitializer& ObjectInitializer);
virtual void OnPossess(APawn* InPawn) override;
private:
// Implement The Generic Team Interface
UPROPERTY(EditAnywhere, Blueprintable, Category = "MG Player Controller")
FGenericTeamId TeamID = 2;
FGenericTeamId GetGenericTeamId() const;
UFUNCTION(BlueprintCallable, Category = "MG Player Controller")
void SetGenericTeamID(int NewTeamID);