[Command] getBuilding

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.getBuilding(Type)


USE:
Get a building related to this NPC AI-wise.

Parameters are Home, Work and Current.


TYPE: Command, Ref
RETURNS: Building
THEME: Building
COMPARE:


EXAMPLE:

Code: Select all

wrk = MainActor.getBuilding(Work)
cur = MainActor.getBuilding(Current)

If cur.isSameBuilding(wrk)
    tp = wrk.getBuildingType()
    If isOpen(tp)
        willFollow = false
        
        Random
            MainActor(sad):: "Oh <Player.Name> I'd like to, but I still have to work."
            MainActor(sad):: "Sorry, <Player.Name> I still have to work."
        EndRandom
    EndIf
EndIf
Last edited by Raddeck on Wed Jun 15, 2022 7:33 pm, edited 1 time in total.
Reason: Added 1 example
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