FromHours
Converts a whole number of hours into minutes (n * 60). A readability
helper for duration math: FromHours(2) says “two hours” more clearly than
120.
Category: Time Returns: int
Signature
FromHours(n)
The argument is a whole number of hours.
Examples
FromHours(2) // 120
TimeSinceLastVisit(scene_bar) > FromHours(2) // more than two hours since the bar
AbsoluteMinutes() < FromHours(6) // within the first six hours
Notes
- Requires time to be enabled for the project (Project, then Time). With time disabled, any expression using this function fails validation.
FromHoursis for expression fields, not event payloads. The Advance Time event’s Minutes field takes a plain number, so write the minute count directly there rather than reaching forFromHours.- Pairs with TotalHours, which does the inverse conversion, minutes back to whole hours.