[Condition] isValid
Posted: Sun Oct 31, 2021 7:41 pm
Actor.isValid()
USE:
Check if an actor variable is valid.
Most commonly used after GetPerson(), GetCompanion() or GetSpecific()
TYPE: Condition, Reference
RETURNS: bool
THEME: Actor Loading
COMPARE: getPerson, getSpecific
EXAMPLE:
USE:
Check if an actor variable is valid.
Most commonly used after GetPerson(), GetCompanion() or GetSpecific()
TYPE: Condition, Reference
RETURNS: bool
THEME: Actor Loading
COMPARE: getPerson, getSpecific
EXAMPLE:
Code: Select all
John = getSpecific(Colleague)
If John.isValid()
"I have at least one colleague"
Else
John = generatePerson()
John.addColleague()
"I met a new colleague, <John.name>"
Endif