HasAssociation - Actor

From Creation Kit
Jump to: navigation, search

Member of: Actor Script

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


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


  • 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.


; Does JoeBob have a Spouse relationship?
if (JoeBob.HasAssociation(SpouseProperty))
  Debug.Trace("JoeBob has a spouse")

; Does JoeBob have a Spouse relationship with Sally?
if (JoeBob.HasAssociation(SpouseProperty, Sally))
  Debug.Trace("JoeBob and Sally are spouses")

See Also