TryToAddToFaction - ReferenceAlias
Jump to navigation
Jump to search
Member of: ReferenceAlias Script
This is a convenient way to add an actor in an alias to a faction without calling GetActorReference() on it. It's mostly useful in cases where you have lots of aliases that may or may not be filled and you want to call AddToFaction() on them without having to test for a reference being present first.
Syntax[edit | edit source]
bool Function TryToAddToFaction(Faction FactionToAddTo)
Parameters[edit | edit source]
- FactionToAddTo: The faction to add the actor to
Return Value[edit | edit source]
True if the actor was added to the faction, false if no actor existed to be added.
Examples[edit | edit source]
; Try to add the boss to the bandit faction
BossAlias.TryToAddToFaction(BanditFaction)