[Condition] isValid

Post Reply
User avatar
Raddeck
LP Manager
Reactions: 1
Posts: 508
Joined: Sat Oct 16, 2021 6:22 pm
Location: LpWorld
Contact:

Post by Raddeck »

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:

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
Like my work? Buy me a coffee or support me on Patreon to keep it coming. :ugeek:
-Don't PM me for support-
Top
Post Reply