Background for Skyrim SE
Member of the ReferenceAlias script
boolfunctionTryToAddToFaction(FactionFactionToAddTo)

Description

Wiki Description

This is a convenient way to add an actor in an alias to a faction without calling ReferenceAlias.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 Actor.AddToFaction(...) on them without having to test for a reference being present first.

Documentation Comment

Convenience function - jduvall


Parameters

  1. FactionFactionToAddTo

    CK Wiki Description

    The faction to add the actor to


Examples

; Try to add the boss to the bandit faction
BossAlias.TryToAddToFaction(BanditFaction)

Auto-Generated Example

Faction myFaction__FactionToAddTo

bool returnedValue = myReferenceAlias__toCallFunctionOn.TryToAddToFaction(myFaction__FactionToAddTo)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.