How-To: Bind Your Team System (Optional)
Goal: connect the Self / Ally / Enemy relationship rules to your project's team logic. The plugin has no team dependency of its own - it asks one overridable query, IsActorFriendly, at most twice per event. While no hook is provided every actor counts as an ally, so ShowAllyEffects governs every third-party event and ShowEnemyEffects never fires.
UCrimsonCombatTextPlayerSettings component on your PlayerController (How-To: Filter Which Pops a Player Sees) and some team system that can answer 'are these two actors friendly?'.Provide the team hook
IsActorFriendly(LocalPawn, OtherActor) is a BlueprintNativeEvent on the component: return true when OtherActor is friendly to LocalPawn. OtherActor is whoever is being judged against the local pawn - currently the instigator of the event. Blueprint projects override the event on a component subclass; C++ projects can instead bind the IsActorFriendlyDelegate, which the native implementation falls back to.
Content Browser > right-click > Blueprint Class > search CrimsonCombatTextPlayerSettings and pick it as the parent. In the new Blueprint, open My Blueprint -> Functions, hover Override and choose Is Actor Friendly.
In the override graph: Is Actor Friendly -> (your team system's query, fed by the `Local Pawn` and `Other Actor` input pins) -> Return Node (Return Value = true when the two are friendly). Return true for a null Other Actor to keep the default everyone-is-friendly behavior.
Then add the subclass to your PlayerController in place of the base component: Components -> + Add -> (your Blueprint's name).
IsActorFriendly takes precedence over the IsActorFriendlyDelegate - the delegate is only consulted by the native implementation, so it runs when nothing overrides the event (or when the Blueprint override calls the parent function).OtherActor = nullptr, so handle that case (returning true keeps the default everyone-is-friendly behavior).IGenericTeamAgentInterface (or your own team interface), read the two actors' teams through it and return true for a null OtherActor to keep that behavior.See also
- How-To: Filter Which Pops a Player Sees - the toggles this hook feeds.
- How-To: Test Pops with the Dev Tools - broadcast enemy-instigated test events to exercise the hook.
- API Reference -
IsActorFriendlyand theFCrimsonIsActorFriendlyDelegatesignature.