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.

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

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


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

See Also