Mod:Creation Kit/HasAssociation - Actor

Member of: Mod:Creation Kit/Actor Script

Does this actor have the specified association with the specified actor? Or with anyone if no actor is passed.

Syntax
bool Function HasAssociation(AssociationType akAssociation, Actor akOther = None) native

Parameters

 * akAssociation: The AssociationType to check for.
 * akOther: The actor to check against. If None, then see if this actor has the specified association with anyone.
 * Default: None

Return Value
Whether this actor has the specified association.

Examples
if (JoeBob.HasAssociation(SpouseProperty)) Debug.Trace("JoeBob has a spouse") endIf if (JoeBob.HasAssociation(SpouseProperty, Sally)) Debug.Trace("JoeBob and Sally are spouses") endIf
 * Does JoeBob have a Spouse relationship?
 * Does JoeBob have a Spouse relationship with Sally?