HasAssociation - Actor

Member of: Actor Script

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

SyntaxEdit

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

ParametersEdit

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

Whether this actor has the specified association.

ExamplesEdit

; 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 AlsoEdit