Page 1 of 1

[Command] setUntil

Posted: Sat Nov 13, 2021 10:44 am
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)