DestroyTimer: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|DestroyTimer(timer)}} {{FuncParameters}} {{FuncParam|timer|__EDIT_ME__}} {{FuncReturnValue|__EDIT..."
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server & Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Destroys a timer created with [[CreateTimer]] or [[CreateCountTimer]].}}


{{FuncSyntax|DestroyTimer(timer)}}
{{FuncSyntax|DestroyTimer(timer)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|timer|__EDIT_ME__}}
{{FuncParam|timer|The timer identifier.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns '''true''' if success, '''false''' on error.}}


== Example ==
== Example ==
__EDIT_ME__
Example usage of timers can be found in the traffic light script:
https://github.com/BlueMountainsIO/OnsetLuaScripts/blob/master/trafficlights/trafficlights_s.lua#L35


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
*[[Delay]]
*[[GetTimerCount]]
*[[GetAllTimers]]
*[[IsValidTimer]]
*[[CreateTimer]]
*[[CreateCountTimer]]
*[[DestroyTimer]]
*[[PauseTimer]]
*[[UnpauseTimer]]
*[[GetTimerRemainingTime]]

Latest revision as of 10:58, 1 September 2020

DestroyTimer

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Destroys a timer created with CreateTimer or CreateCountTimer.

Syntax

DestroyTimer(timer)

Parameters

  • timer
    The timer identifier.

Return Value

  • Returns true if success, false on error.

Example

Example usage of timers can be found in the traffic light script: https://github.com/BlueMountainsIO/OnsetLuaScripts/blob/master/trafficlights/trafficlights_s.lua#L35

See also