[Command] setUntil

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.setUntil(floatvariable)


USE:
Set until what time this person will stay at their current location before AI searches for a new location for them again.
The float variable isn't the time of the day, but total hours elapsed since the start of the current game,
i.e. HoursElapsed + HoursToStay
HoursElapsed being a special variable and HoursToStay is up to you.


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


EXAMPLE:
In lpscene

Code: Select all

Until = HoursElapsed + Random(1, 3)
Actor.setUntil(Until)
or in lpai file

Code: Select all

Until = HoursElapsed + Random(2, 4)                     
AI.setCurrentLocation(Dest)
AI.setUntil(Until)
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