HasAssociation - Actor
Jump to navigation
Jump to 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[edit | edit source]
bool Function HasAssociation(AssociationType akAssociation, Actor akOther = None) native
Parameters[edit | edit source]
- 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[edit | edit source]
Whether this actor has the specified association.
Examples[edit | edit source]
; 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