Scheduler Lua API: Difference between revisions

From Off Grid Wiki
Jump to navigation Jump to search
(adding DocStart)
No edit summary
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{OffGridDocStart}}
<!-- This file is auto generated, please don't edit manually! -->
= Scheduler =
= Scheduler =
== Description ==
== Description ==
The Scheduler api allows users to Schedule callback events based on specific time values
The Scheduler api allows users to Schedule callback events based on specific time values
== Functions ==
== Functions ==
=== CallInSecsWorld ===
=== CallInSecsReal ===
<syntaxhighlight source lang="lua">Scheduler.CallInSecsWorld(func, timeInSecs)</syntaxhighlight>
<syntaxhighlight source lang="lua">Scheduler.CallInSecsReal(func, timeInSecs)</syntaxhighlight>
'''Expected parameter types'''
'''Expected parameter types'''
{| class="wikitable"
{| class="wikitable"
|-
! Name !! Type
|-
|-
| func || Lua Type
| func || Lua Type
|-
|-
| timeInSecs || number (optional)
| timeInSecs || number
|}
|}
'''Description''': Schedule a lua function to be called in timeInSecs world time (1 sec real time = 3 secs world
'''Description''': Schedule a lua function to be called in timeInSecs real time


'''Returns''': The id of the scheduled event
'''Returns''': The id of the scheduled event


=== CallInSecsReal ===
=== CallInSecs ===
<syntaxhighlight source lang="lua">Scheduler.CallInSecsReal(func, timeInSecs)</syntaxhighlight>
<syntaxhighlight source lang="lua">Scheduler.CallInSecs(func, timeInSecs)</syntaxhighlight>
'''Expected parameter types'''
{| class="wikitable"
|-
! Name !! Type
|-
| func || Lua Type
|-
| timeInSecs || number
|}
'''Description''': Schedule a lua function to be called in timeInSecs scaled time
 
'''Returns''': The id of the scheduled event
 
=== CallAtTime ===
<syntaxhighlight source lang="lua">Scheduler.CallAtTime(func, dateTimeString)</syntaxhighlight>
'''Expected parameter types'''
'''Expected parameter types'''
{| class="wikitable"
{| class="wikitable"
|-
! Name !! Type
|-
|-
| func || Lua Type
| func || Lua Type
|-
|-
| timeInSecs || number (optional)
| dateTimeString || string
|}
|}
'''Description''': Schedule a lua function to be called in timeInSecs real time
'''Description''': Schedule a lua function to be called at specific time (defined by a date/time string)


'''Returns''': The id of the scheduled event
'''Returns''': The id of the scheduled event
Line 32: Line 51:




'''Docs last hacked together on''': 09/05/2017 12:59
This file is auto generated, please don't edit manually!
 
'''Docs last hacked together on''': 13/10/2021 15:55
[[Category:Modding]][[Category:LuaAPI]]

Revision as of 08:53, 14 October 2021

Scheduler

Description

The Scheduler api allows users to Schedule callback events based on specific time values

Functions

CallInSecsReal

Scheduler.CallInSecsReal(func, timeInSecs)

Expected parameter types

Name Type
func Lua Type
timeInSecs number

Description: Schedule a lua function to be called in timeInSecs real time

Returns: The id of the scheduled event

CallInSecs

Scheduler.CallInSecs(func, timeInSecs)

Expected parameter types

Name Type
func Lua Type
timeInSecs number

Description: Schedule a lua function to be called in timeInSecs scaled time

Returns: The id of the scheduled event

CallAtTime

Scheduler.CallAtTime(func, dateTimeString)

Expected parameter types

Name Type
func Lua Type
dateTimeString string

Description: Schedule a lua function to be called at specific time (defined by a date/time string)

Returns: The id of the scheduled event


This file is auto generated, please don't edit manually!

Docs last hacked together on: 13/10/2021 15:55