<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://chronocrash.com/openbor/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=KnownhostService</id>
	<title>OpenBOR - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://chronocrash.com/openbor/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=KnownhostService"/>
	<link rel="alternate" type="text/html" href="https://chronocrash.com/openbor/wiki/index.php/Special:Contributions/KnownhostService"/>
	<updated>2026-12-04T20:12:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.4</generator>
	<entry>
		<id>https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=73</id>
		<title>Time</title>
		<link rel="alternate" type="text/html" href="https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=73"/>
		<updated>2026-07-12T18:35:34Z</updated>

		<summary type="html">&lt;p&gt;KnownhostService: /* Set Time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Timing is crucial to OpenBOR, as it is with most game engines. Understanding how the engine measures time, and how those measurements affect a project, is therefore essential. OpenBOR’s primary unit of time is the &#039;&#039;&#039;centisecond&#039;&#039;&#039;, or one hundredth of a second. Animation delays, for example, are expressed in centiseconds. Other units may be used depending on the feature, circumstance, or design requirement.&lt;br /&gt;
&lt;br /&gt;
Time in OpenBOR is represented by the following primary definitions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Time&#039;&#039;&#039; – The traditional beat ’em up countdown timer that forces players to maintain pace or lose a life when time expires. Game Time is enabled by default, though creators may disable or remove it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Elapsed Time&#039;&#039;&#039; – An integer value reset at the beginning of each active level and incremented on every engine update while the level remains active. Elapsed Time drives much of the engine’s internal timing, including animations, delays, effect duration, and other game-play processes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ticks&#039;&#039;&#039; – The number of milliseconds elapsed since the current game session began. Tick values are primarily used for timing operations outside active game-play, including loading processes and recorded player input.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;System Time -&#039;&#039;&#039; OpenBOR script includes an API to access the host system clock for obtaining real-world dates and times. System clock access is entirely optional and does not affect native engine timing or game-play functionality.&lt;br /&gt;
[[File:Obor clock.png|center|frame|OpenBOR exposes several types of time, including world time and time elapsed since startup.]]&lt;br /&gt;
&lt;br /&gt;
== Game Time ==&lt;br /&gt;
Game time is a default countdown timer that appears at top center of the screen during an active level. It starts at 99 and decrements once every two real world seconds. At 0, all active players take damage equal to their current HP, and the game is over if no lives or credits remain. Time resets automatically when players clear a designated level wait and at the start of each new level. [[File:Batman savage dawn a.png|alt=Batman Savage Dawn screenshot.|center|frame|The Batman Savage Dawn fan game demonstrates OpenBOR&#039;s default game timer in action at top center of the screen.]]&lt;br /&gt;
&lt;br /&gt;
=== Set Time ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;settime {int time}&lt;br /&gt;
&lt;br /&gt;
#default&lt;br /&gt;
settime 99&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Level header command that sets value applied to timer on level start and native resets.&lt;br /&gt;
&lt;br /&gt;
* Accepts any integer value from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;99&amp;lt;/code&amp;gt;. Out of bounds values are ignored. &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = infinite time.&lt;br /&gt;
&lt;br /&gt;
=== HUD Display ===&lt;br /&gt;
For configuring how timer displays on screen, see [[Heads Up Display]].&lt;br /&gt;
&lt;br /&gt;
* [[Heads Up Display#Disable Time Display|Disable Time Display]]&lt;br /&gt;
* [[Heads Up Display#Timer Font|Timer Font]]&lt;br /&gt;
* [[Heads Up Display#Timer Location and Border|Timer Location]]&lt;br /&gt;
* [[Heads Up Display#Timer Icon|Timer Icon]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== data/sounds/timeover.wav ====&lt;br /&gt;
If available, plays once when the game timer expires.&lt;br /&gt;
&lt;br /&gt;
==== anim lose ====&lt;br /&gt;
If available, entity plays this animation in place of normal death when game timer expires. &lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_LOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== anim falllose ====&lt;br /&gt;
If available and entity does not have a lose animation, entity plays this animation in place of normal fall death when game timer expires.&lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_FALLLOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Attack types ====&lt;br /&gt;
Attack types applied to players when game time expires.&lt;br /&gt;
&lt;br /&gt;
* openborconstant(&amp;quot;ATK_TIMEOVER&amp;quot;) - Applied to players without a lose animation.&lt;br /&gt;
* openborconstant(&amp;quot;ATK_LOSE&amp;quot;) - Applied to players with a lose animation.&lt;br /&gt;
&lt;br /&gt;
=== Script API ===&lt;br /&gt;
&lt;br /&gt;
==== Game Time ====&lt;br /&gt;
Current game time is read and write accessible.&lt;br /&gt;
&lt;br /&gt;
===== Get =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int time = openborvariant(&amp;quot;game_time&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Get integer representing game time remaining.&lt;br /&gt;
&lt;br /&gt;
===== Set =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int new_time = 50;&lt;br /&gt;
&lt;br /&gt;
setopenborvariat(&amp;quot;game_time&amp;quot;, new_time);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Set game time remaining.&lt;br /&gt;
&lt;br /&gt;
==== Timetick Event ====&lt;br /&gt;
If available, &amp;lt;code&amp;gt;data/scripts/timetick.c&amp;lt;/code&amp;gt; fires on each game time decrement. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; - Current game time value.&lt;br /&gt;
&lt;br /&gt;
== Ticks ==&lt;br /&gt;
Ticks is a read only measure of milliseconds starting from game boot. OpenBOR natively uses ticks for the player input recording feature and for timing during load screens. Ticks therefore do not generally affect active game-play, but are useful for user content, scripting, and keeping time outside of active game-play elements when increments are not natively incremented. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;openborvariant(&amp;quot;ticks&amp;quot;)&amp;lt;/code&amp;gt; - Get integer milliseconds from game boot.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;br /&gt;
[[Category:OpenBOR Index]]&lt;/div&gt;</summary>
		<author><name>KnownhostService</name></author>
	</entry>
	<entry>
		<id>https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=72</id>
		<title>Time</title>
		<link rel="alternate" type="text/html" href="https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=72"/>
		<updated>2026-07-12T18:21:45Z</updated>

		<summary type="html">&lt;p&gt;KnownhostService: /* Set Time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Timing is crucial to OpenBOR, as it is with most game engines. Understanding how the engine measures time, and how those measurements affect a project, is therefore essential. OpenBOR’s primary unit of time is the &#039;&#039;&#039;centisecond&#039;&#039;&#039;, or one hundredth of a second. Animation delays, for example, are expressed in centiseconds. Other units may be used depending on the feature, circumstance, or design requirement.&lt;br /&gt;
&lt;br /&gt;
Time in OpenBOR is represented by the following primary definitions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Time&#039;&#039;&#039; – The traditional beat ’em up countdown timer that forces players to maintain pace or lose a life when time expires. Game Time is enabled by default, though creators may disable or remove it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Elapsed Time&#039;&#039;&#039; – An integer value reset at the beginning of each active level and incremented on every engine update while the level remains active. Elapsed Time drives much of the engine’s internal timing, including animations, delays, effect duration, and other game-play processes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ticks&#039;&#039;&#039; – The number of milliseconds elapsed since the current game session began. Tick values are primarily used for timing operations outside active game-play, including loading processes and recorded player input.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;System Time -&#039;&#039;&#039; OpenBOR script includes an API to access the host system clock for obtaining real-world dates and times. System clock access is entirely optional and does not affect native engine timing or game-play functionality.&lt;br /&gt;
[[File:Obor clock.png|center|frame|OpenBOR exposes several types of time, including world time and time elapsed since startup.]]&lt;br /&gt;
&lt;br /&gt;
== Game Time ==&lt;br /&gt;
Game time is a default countdown timer that appears at top center of the screen during an active level. It starts at 99 and decrements once every two real world seconds. At 0, all active players take damage equal to their current HP, and the game is over if no lives or credits remain. Time resets automatically when players clear a designated level wait and at the start of each new level. [[File:Batman savage dawn a.png|alt=Batman Savage Dawn screenshot.|center|frame|The Batman Savage Dawn fan game demonstrates OpenBOR&#039;s default game timer in action at top center of the screen.]]&lt;br /&gt;
&lt;br /&gt;
=== Set Time ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;settime {int time}&lt;br /&gt;
&lt;br /&gt;
#default&lt;br /&gt;
settime 99&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Level header command that sets value applied to timer on level start and native resets.&lt;br /&gt;
&lt;br /&gt;
* Accepts any integer value from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;99&amp;lt;/code&amp;gt;. Out of bounds values are ignored. &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = infinite time.&lt;br /&gt;
&lt;br /&gt;
=== HUD Display ===&lt;br /&gt;
For configuring how timer displays on screen, see [[Heads Up Display]].&lt;br /&gt;
&lt;br /&gt;
* [[Heads Up Display#Disable Time Display|Disable Time Display]]&lt;br /&gt;
* [[Heads Up Display#Timer Font|Timer Font]]&lt;br /&gt;
* [[Heads Up Display#Timer Location and Border|Timer Location]]&lt;br /&gt;
* [[Heads Up Display#Timer Icon|Timer Icon]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== data/sounds/timeover.wav ====&lt;br /&gt;
If available, plays once when the game timer expires.&lt;br /&gt;
&lt;br /&gt;
==== anim lose ====&lt;br /&gt;
If available, entity plays this animation in place of normal death when game timer expires. &lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_LOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== anim falllose ====&lt;br /&gt;
If available and entity does not have a lose animation, entity plays this animation in place of normal fall death when game timer expires.&lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_FALLLOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Attack types ====&lt;br /&gt;
Attack types applied to players when game time expires.&lt;br /&gt;
&lt;br /&gt;
* openborconstant(&amp;quot;ATK_TIMEOVER&amp;quot;) - Applied to players without a lose animation.&lt;br /&gt;
* openborconstant(&amp;quot;ATK_LOSE&amp;quot;) - Applied to players with a lose animation.&lt;br /&gt;
&lt;br /&gt;
=== Script API ===&lt;br /&gt;
&lt;br /&gt;
==== Game Time ====&lt;br /&gt;
Current game time is read and write accessible.&lt;br /&gt;
&lt;br /&gt;
===== Get =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int time = openborvariant(&amp;quot;game_time&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Get integer representing game time remaining.&lt;br /&gt;
&lt;br /&gt;
===== Set =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int new_time = 50;&lt;br /&gt;
&lt;br /&gt;
setopenborvariat(&amp;quot;game_time&amp;quot;, new_time);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Set game time remaining.&lt;br /&gt;
&lt;br /&gt;
==== Timetick Event ====&lt;br /&gt;
If available, &amp;lt;code&amp;gt;data/scripts/timetick.c&amp;lt;/code&amp;gt; fires on each game time decrement. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; - Current game time value.&lt;br /&gt;
&lt;br /&gt;
== Ticks ==&lt;br /&gt;
Ticks is a read only measure of milliseconds starting from game boot. OpenBOR natively uses ticks for the player input recording feature and for timing during load screens. Ticks therefore do not generally affect active game-play, but are useful for user content, scripting, and keeping time outside of active game-play elements when increments are not natively incremented. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;openborvariant(&amp;quot;ticks&amp;quot;)&amp;lt;/code&amp;gt; - Get integer milliseconds from game boot.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;br /&gt;
[[Category:OpenBOR Index]]&lt;/div&gt;</summary>
		<author><name>KnownhostService</name></author>
	</entry>
	<entry>
		<id>https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=71</id>
		<title>Time</title>
		<link rel="alternate" type="text/html" href="https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=71"/>
		<updated>2026-07-12T18:21:15Z</updated>

		<summary type="html">&lt;p&gt;KnownhostService: /* Set Time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Timing is crucial to OpenBOR, as it is with most game engines. Understanding how the engine measures time, and how those measurements affect a project, is therefore essential. OpenBOR’s primary unit of time is the &#039;&#039;&#039;centisecond&#039;&#039;&#039;, or one hundredth of a second. Animation delays, for example, are expressed in centiseconds. Other units may be used depending on the feature, circumstance, or design requirement.&lt;br /&gt;
&lt;br /&gt;
Time in OpenBOR is represented by the following primary definitions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Time&#039;&#039;&#039; – The traditional beat ’em up countdown timer that forces players to maintain pace or lose a life when time expires. Game Time is enabled by default, though creators may disable or remove it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Elapsed Time&#039;&#039;&#039; – An integer value reset at the beginning of each active level and incremented on every engine update while the level remains active. Elapsed Time drives much of the engine’s internal timing, including animations, delays, effect duration, and other game-play processes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ticks&#039;&#039;&#039; – The number of milliseconds elapsed since the current game session began. Tick values are primarily used for timing operations outside active game-play, including loading processes and recorded player input.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;System Time -&#039;&#039;&#039; OpenBOR script includes an API to access the host system clock for obtaining real-world dates and times. System clock access is entirely optional and does not affect native engine timing or game-play functionality.&lt;br /&gt;
[[File:Obor clock.png|center|frame|OpenBOR exposes several types of time, including world time and time elapsed since startup.]]&lt;br /&gt;
&lt;br /&gt;
== Game Time ==&lt;br /&gt;
Game time is a default countdown timer that appears at top center of the screen during an active level. It starts at 99 and decrements once every two real world seconds. At 0, all active players take damage equal to their current HP, and the game is over if no lives or credits remain. Time resets automatically when players clear a designated level wait and at the start of each new level. [[File:Batman savage dawn a.png|alt=Batman Savage Dawn screenshot.|center|frame|The Batman Savage Dawn fan game demonstrates OpenBOR&#039;s default game timer in action at top center of the screen.]]&lt;br /&gt;
&lt;br /&gt;
=== Set Time ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;settime {int time}&lt;br /&gt;
&lt;br /&gt;
#default&lt;br /&gt;
settime 99&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;python3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;br /&gt;
def hello():&lt;br /&gt;
    print(&amp;quot;Hello&amp;quot;)&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level header command that sets value applied to timer on level start and native resets.&lt;br /&gt;
&lt;br /&gt;
* Accepts any integer value from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;99&amp;lt;/code&amp;gt;. Out of bounds values are ignored. &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = infinite time.&lt;br /&gt;
&lt;br /&gt;
=== HUD Display ===&lt;br /&gt;
For configuring how timer displays on screen, see [[Heads Up Display]].&lt;br /&gt;
&lt;br /&gt;
* [[Heads Up Display#Disable Time Display|Disable Time Display]]&lt;br /&gt;
* [[Heads Up Display#Timer Font|Timer Font]]&lt;br /&gt;
* [[Heads Up Display#Timer Location and Border|Timer Location]]&lt;br /&gt;
* [[Heads Up Display#Timer Icon|Timer Icon]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== data/sounds/timeover.wav ====&lt;br /&gt;
If available, plays once when the game timer expires.&lt;br /&gt;
&lt;br /&gt;
==== anim lose ====&lt;br /&gt;
If available, entity plays this animation in place of normal death when game timer expires. &lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_LOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== anim falllose ====&lt;br /&gt;
If available and entity does not have a lose animation, entity plays this animation in place of normal fall death when game timer expires.&lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_FALLLOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Attack types ====&lt;br /&gt;
Attack types applied to players when game time expires.&lt;br /&gt;
&lt;br /&gt;
* openborconstant(&amp;quot;ATK_TIMEOVER&amp;quot;) - Applied to players without a lose animation.&lt;br /&gt;
* openborconstant(&amp;quot;ATK_LOSE&amp;quot;) - Applied to players with a lose animation.&lt;br /&gt;
&lt;br /&gt;
=== Script API ===&lt;br /&gt;
&lt;br /&gt;
==== Game Time ====&lt;br /&gt;
Current game time is read and write accessible.&lt;br /&gt;
&lt;br /&gt;
===== Get =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int time = openborvariant(&amp;quot;game_time&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Get integer representing game time remaining.&lt;br /&gt;
&lt;br /&gt;
===== Set =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int new_time = 50;&lt;br /&gt;
&lt;br /&gt;
setopenborvariat(&amp;quot;game_time&amp;quot;, new_time);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Set game time remaining.&lt;br /&gt;
&lt;br /&gt;
==== Timetick Event ====&lt;br /&gt;
If available, &amp;lt;code&amp;gt;data/scripts/timetick.c&amp;lt;/code&amp;gt; fires on each game time decrement. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; - Current game time value.&lt;br /&gt;
&lt;br /&gt;
== Ticks ==&lt;br /&gt;
Ticks is a read only measure of milliseconds starting from game boot. OpenBOR natively uses ticks for the player input recording feature and for timing during load screens. Ticks therefore do not generally affect active game-play, but are useful for user content, scripting, and keeping time outside of active game-play elements when increments are not natively incremented. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;openborvariant(&amp;quot;ticks&amp;quot;)&amp;lt;/code&amp;gt; - Get integer milliseconds from game boot.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;br /&gt;
[[Category:OpenBOR Index]]&lt;/div&gt;</summary>
		<author><name>KnownhostService</name></author>
	</entry>
	<entry>
		<id>https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=70</id>
		<title>Time</title>
		<link rel="alternate" type="text/html" href="https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=70"/>
		<updated>2026-07-12T18:20:51Z</updated>

		<summary type="html">&lt;p&gt;KnownhostService: /* Set Time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Timing is crucial to OpenBOR, as it is with most game engines. Understanding how the engine measures time, and how those measurements affect a project, is therefore essential. OpenBOR’s primary unit of time is the &#039;&#039;&#039;centisecond&#039;&#039;&#039;, or one hundredth of a second. Animation delays, for example, are expressed in centiseconds. Other units may be used depending on the feature, circumstance, or design requirement.&lt;br /&gt;
&lt;br /&gt;
Time in OpenBOR is represented by the following primary definitions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Time&#039;&#039;&#039; – The traditional beat ’em up countdown timer that forces players to maintain pace or lose a life when time expires. Game Time is enabled by default, though creators may disable or remove it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Elapsed Time&#039;&#039;&#039; – An integer value reset at the beginning of each active level and incremented on every engine update while the level remains active. Elapsed Time drives much of the engine’s internal timing, including animations, delays, effect duration, and other game-play processes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ticks&#039;&#039;&#039; – The number of milliseconds elapsed since the current game session began. Tick values are primarily used for timing operations outside active game-play, including loading processes and recorded player input.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;System Time -&#039;&#039;&#039; OpenBOR script includes an API to access the host system clock for obtaining real-world dates and times. System clock access is entirely optional and does not affect native engine timing or game-play functionality.&lt;br /&gt;
[[File:Obor clock.png|center|frame|OpenBOR exposes several types of time, including world time and time elapsed since startup.]]&lt;br /&gt;
&lt;br /&gt;
== Game Time ==&lt;br /&gt;
Game time is a default countdown timer that appears at top center of the screen during an active level. It starts at 99 and decrements once every two real world seconds. At 0, all active players take damage equal to their current HP, and the game is over if no lives or credits remain. Time resets automatically when players clear a designated level wait and at the start of each new level. [[File:Batman savage dawn a.png|alt=Batman Savage Dawn screenshot.|center|frame|The Batman Savage Dawn fan game demonstrates OpenBOR&#039;s default game timer in action at top center of the screen.]]&lt;br /&gt;
&lt;br /&gt;
=== Set Time ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;settime {int time}&lt;br /&gt;
&lt;br /&gt;
#default&lt;br /&gt;
settime 99&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;python3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;br /&gt;
def hello():&lt;br /&gt;
    print(&amp;quot;Hello&amp;quot;)&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level header command that sets value applied to timer on level start and native resets.&lt;br /&gt;
&lt;br /&gt;
* Accepts any integer value from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;99&amp;lt;/code&amp;gt;. Out of bounds values are ignored. &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = infinite time.&lt;br /&gt;
&lt;br /&gt;
=== HUD Display ===&lt;br /&gt;
For configuring how timer displays on screen, see [[Heads Up Display]].&lt;br /&gt;
&lt;br /&gt;
* [[Heads Up Display#Disable Time Display|Disable Time Display]]&lt;br /&gt;
* [[Heads Up Display#Timer Font|Timer Font]]&lt;br /&gt;
* [[Heads Up Display#Timer Location and Border|Timer Location]]&lt;br /&gt;
* [[Heads Up Display#Timer Icon|Timer Icon]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== data/sounds/timeover.wav ====&lt;br /&gt;
If available, plays once when the game timer expires.&lt;br /&gt;
&lt;br /&gt;
==== anim lose ====&lt;br /&gt;
If available, entity plays this animation in place of normal death when game timer expires. &lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_LOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== anim falllose ====&lt;br /&gt;
If available and entity does not have a lose animation, entity plays this animation in place of normal fall death when game timer expires.&lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_FALLLOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Attack types ====&lt;br /&gt;
Attack types applied to players when game time expires.&lt;br /&gt;
&lt;br /&gt;
* openborconstant(&amp;quot;ATK_TIMEOVER&amp;quot;) - Applied to players without a lose animation.&lt;br /&gt;
* openborconstant(&amp;quot;ATK_LOSE&amp;quot;) - Applied to players with a lose animation.&lt;br /&gt;
&lt;br /&gt;
=== Script API ===&lt;br /&gt;
&lt;br /&gt;
==== Game Time ====&lt;br /&gt;
Current game time is read and write accessible.&lt;br /&gt;
&lt;br /&gt;
===== Get =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int time = openborvariant(&amp;quot;game_time&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Get integer representing game time remaining.&lt;br /&gt;
&lt;br /&gt;
===== Set =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int new_time = 50;&lt;br /&gt;
&lt;br /&gt;
setopenborvariat(&amp;quot;game_time&amp;quot;, new_time);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Set game time remaining.&lt;br /&gt;
&lt;br /&gt;
==== Timetick Event ====&lt;br /&gt;
If available, &amp;lt;code&amp;gt;data/scripts/timetick.c&amp;lt;/code&amp;gt; fires on each game time decrement. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; - Current game time value.&lt;br /&gt;
&lt;br /&gt;
== Ticks ==&lt;br /&gt;
Ticks is a read only measure of milliseconds starting from game boot. OpenBOR natively uses ticks for the player input recording feature and for timing during load screens. Ticks therefore do not generally affect active game-play, but are useful for user content, scripting, and keeping time outside of active game-play elements when increments are not natively incremented. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;openborvariant(&amp;quot;ticks&amp;quot;)&amp;lt;/code&amp;gt; - Get integer milliseconds from game boot.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;br /&gt;
[[Category:OpenBOR Index]]&lt;/div&gt;</summary>
		<author><name>KnownhostService</name></author>
	</entry>
	<entry>
		<id>https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=69</id>
		<title>Time</title>
		<link rel="alternate" type="text/html" href="https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=69"/>
		<updated>2026-07-12T18:20:25Z</updated>

		<summary type="html">&lt;p&gt;KnownhostService: /* Set Time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Timing is crucial to OpenBOR, as it is with most game engines. Understanding how the engine measures time, and how those measurements affect a project, is therefore essential. OpenBOR’s primary unit of time is the &#039;&#039;&#039;centisecond&#039;&#039;&#039;, or one hundredth of a second. Animation delays, for example, are expressed in centiseconds. Other units may be used depending on the feature, circumstance, or design requirement.&lt;br /&gt;
&lt;br /&gt;
Time in OpenBOR is represented by the following primary definitions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Time&#039;&#039;&#039; – The traditional beat ’em up countdown timer that forces players to maintain pace or lose a life when time expires. Game Time is enabled by default, though creators may disable or remove it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Elapsed Time&#039;&#039;&#039; – An integer value reset at the beginning of each active level and incremented on every engine update while the level remains active. Elapsed Time drives much of the engine’s internal timing, including animations, delays, effect duration, and other game-play processes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ticks&#039;&#039;&#039; – The number of milliseconds elapsed since the current game session began. Tick values are primarily used for timing operations outside active game-play, including loading processes and recorded player input.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;System Time -&#039;&#039;&#039; OpenBOR script includes an API to access the host system clock for obtaining real-world dates and times. System clock access is entirely optional and does not affect native engine timing or game-play functionality.&lt;br /&gt;
[[File:Obor clock.png|center|frame|OpenBOR exposes several types of time, including world time and time elapsed since startup.]]&lt;br /&gt;
&lt;br /&gt;
== Game Time ==&lt;br /&gt;
Game time is a default countdown timer that appears at top center of the screen during an active level. It starts at 99 and decrements once every two real world seconds. At 0, all active players take damage equal to their current HP, and the game is over if no lives or credits remain. Time resets automatically when players clear a designated level wait and at the start of each new level. [[File:Batman savage dawn a.png|alt=Batman Savage Dawn screenshot.|center|frame|The Batman Savage Dawn fan game demonstrates OpenBOR&#039;s default game timer in action at top center of the screen.]]&lt;br /&gt;
&lt;br /&gt;
=== Set Time ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;settime {int time}&lt;br /&gt;
&lt;br /&gt;
#default&lt;br /&gt;
settime 99&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;python3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;br /&gt;
def hello():&lt;br /&gt;
    print(&amp;quot;Hello&amp;quot;)&lt;br /&gt;
&amp;amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Level header command that sets value applied to timer on level start and native resets.&lt;br /&gt;
&lt;br /&gt;
* Accepts any integer value from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;99&amp;lt;/code&amp;gt;. Out of bounds values are ignored. &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = infinite time.&lt;br /&gt;
&lt;br /&gt;
=== HUD Display ===&lt;br /&gt;
For configuring how timer displays on screen, see [[Heads Up Display]].&lt;br /&gt;
&lt;br /&gt;
* [[Heads Up Display#Disable Time Display|Disable Time Display]]&lt;br /&gt;
* [[Heads Up Display#Timer Font|Timer Font]]&lt;br /&gt;
* [[Heads Up Display#Timer Location and Border|Timer Location]]&lt;br /&gt;
* [[Heads Up Display#Timer Icon|Timer Icon]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== data/sounds/timeover.wav ====&lt;br /&gt;
If available, plays once when the game timer expires.&lt;br /&gt;
&lt;br /&gt;
==== anim lose ====&lt;br /&gt;
If available, entity plays this animation in place of normal death when game timer expires. &lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_LOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== anim falllose ====&lt;br /&gt;
If available and entity does not have a lose animation, entity plays this animation in place of normal fall death when game timer expires.&lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_FALLLOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Attack types ====&lt;br /&gt;
Attack types applied to players when game time expires.&lt;br /&gt;
&lt;br /&gt;
* openborconstant(&amp;quot;ATK_TIMEOVER&amp;quot;) - Applied to players without a lose animation.&lt;br /&gt;
* openborconstant(&amp;quot;ATK_LOSE&amp;quot;) - Applied to players with a lose animation.&lt;br /&gt;
&lt;br /&gt;
=== Script API ===&lt;br /&gt;
&lt;br /&gt;
==== Game Time ====&lt;br /&gt;
Current game time is read and write accessible.&lt;br /&gt;
&lt;br /&gt;
===== Get =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int time = openborvariant(&amp;quot;game_time&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Get integer representing game time remaining.&lt;br /&gt;
&lt;br /&gt;
===== Set =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int new_time = 50;&lt;br /&gt;
&lt;br /&gt;
setopenborvariat(&amp;quot;game_time&amp;quot;, new_time);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Set game time remaining.&lt;br /&gt;
&lt;br /&gt;
==== Timetick Event ====&lt;br /&gt;
If available, &amp;lt;code&amp;gt;data/scripts/timetick.c&amp;lt;/code&amp;gt; fires on each game time decrement. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; - Current game time value.&lt;br /&gt;
&lt;br /&gt;
== Ticks ==&lt;br /&gt;
Ticks is a read only measure of milliseconds starting from game boot. OpenBOR natively uses ticks for the player input recording feature and for timing during load screens. Ticks therefore do not generally affect active game-play, but are useful for user content, scripting, and keeping time outside of active game-play elements when increments are not natively incremented. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;openborvariant(&amp;quot;ticks&amp;quot;)&amp;lt;/code&amp;gt; - Get integer milliseconds from game boot.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;br /&gt;
[[Category:OpenBOR Index]]&lt;/div&gt;</summary>
		<author><name>KnownhostService</name></author>
	</entry>
	<entry>
		<id>https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=68</id>
		<title>Time</title>
		<link rel="alternate" type="text/html" href="https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=68"/>
		<updated>2026-07-12T18:02:06Z</updated>

		<summary type="html">&lt;p&gt;KnownhostService: /* Set Time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Timing is crucial to OpenBOR, as it is with most game engines. Understanding how the engine measures time, and how those measurements affect a project, is therefore essential. OpenBOR’s primary unit of time is the &#039;&#039;&#039;centisecond&#039;&#039;&#039;, or one hundredth of a second. Animation delays, for example, are expressed in centiseconds. Other units may be used depending on the feature, circumstance, or design requirement.&lt;br /&gt;
&lt;br /&gt;
Time in OpenBOR is represented by the following primary definitions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Time&#039;&#039;&#039; – The traditional beat ’em up countdown timer that forces players to maintain pace or lose a life when time expires. Game Time is enabled by default, though creators may disable or remove it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Elapsed Time&#039;&#039;&#039; – An integer value reset at the beginning of each active level and incremented on every engine update while the level remains active. Elapsed Time drives much of the engine’s internal timing, including animations, delays, effect duration, and other game-play processes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ticks&#039;&#039;&#039; – The number of milliseconds elapsed since the current game session began. Tick values are primarily used for timing operations outside active game-play, including loading processes and recorded player input.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;System Time -&#039;&#039;&#039; OpenBOR script includes an API to access the host system clock for obtaining real-world dates and times. System clock access is entirely optional and does not affect native engine timing or game-play functionality.&lt;br /&gt;
[[File:Obor clock.png|center|frame|OpenBOR exposes several types of time, including world time and time elapsed since startup.]]&lt;br /&gt;
&lt;br /&gt;
== Game Time ==&lt;br /&gt;
Game time is a default countdown timer that appears at top center of the screen during an active level. It starts at 99 and decrements once every two real world seconds. At 0, all active players take damage equal to their current HP, and the game is over if no lives or credits remain. Time resets automatically when players clear a designated level wait and at the start of each new level. [[File:Batman savage dawn a.png|alt=Batman Savage Dawn screenshot.|center|frame|The Batman Savage Dawn fan game demonstrates OpenBOR&#039;s default game timer in action at top center of the screen.]]&lt;br /&gt;
&lt;br /&gt;
=== Set Time ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;settime {int time}&lt;br /&gt;
&lt;br /&gt;
#default&lt;br /&gt;
settime 99&amp;lt;/syntaxhighlight&amp;gt;Level header command that sets value applied to timer on level start and native resets.&lt;br /&gt;
&lt;br /&gt;
* Accepts any integer value from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;99&amp;lt;/code&amp;gt;. Out of bounds values are ignored. &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = infinite time.&lt;br /&gt;
&lt;br /&gt;
=== HUD Display ===&lt;br /&gt;
For configuring how timer displays on screen, see [[Heads Up Display]].&lt;br /&gt;
&lt;br /&gt;
* [[Heads Up Display#Disable Time Display|Disable Time Display]]&lt;br /&gt;
* [[Heads Up Display#Timer Font|Timer Font]]&lt;br /&gt;
* [[Heads Up Display#Timer Location and Border|Timer Location]]&lt;br /&gt;
* [[Heads Up Display#Timer Icon|Timer Icon]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== data/sounds/timeover.wav ====&lt;br /&gt;
If available, plays once when the game timer expires.&lt;br /&gt;
&lt;br /&gt;
==== anim lose ====&lt;br /&gt;
If available, entity plays this animation in place of normal death when game timer expires. &lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_LOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== anim falllose ====&lt;br /&gt;
If available and entity does not have a lose animation, entity plays this animation in place of normal fall death when game timer expires.&lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_FALLLOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Attack types ====&lt;br /&gt;
Attack types applied to players when game time expires.&lt;br /&gt;
&lt;br /&gt;
* openborconstant(&amp;quot;ATK_TIMEOVER&amp;quot;) - Applied to players without a lose animation.&lt;br /&gt;
* openborconstant(&amp;quot;ATK_LOSE&amp;quot;) - Applied to players with a lose animation.&lt;br /&gt;
&lt;br /&gt;
=== Script API ===&lt;br /&gt;
&lt;br /&gt;
==== Game Time ====&lt;br /&gt;
Current game time is read and write accessible.&lt;br /&gt;
&lt;br /&gt;
===== Get =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int time = openborvariant(&amp;quot;game_time&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Get integer representing game time remaining.&lt;br /&gt;
&lt;br /&gt;
===== Set =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int new_time = 50;&lt;br /&gt;
&lt;br /&gt;
setopenborvariat(&amp;quot;game_time&amp;quot;, new_time);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Set game time remaining.&lt;br /&gt;
&lt;br /&gt;
==== Timetick Event ====&lt;br /&gt;
If available, &amp;lt;code&amp;gt;data/scripts/timetick.c&amp;lt;/code&amp;gt; fires on each game time decrement. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; - Current game time value.&lt;br /&gt;
&lt;br /&gt;
== Ticks ==&lt;br /&gt;
Ticks is a read only measure of milliseconds starting from game boot. OpenBOR natively uses ticks for the player input recording feature and for timing during load screens. Ticks therefore do not generally affect active game-play, but are useful for user content, scripting, and keeping time outside of active game-play elements when increments are not natively incremented. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;openborvariant(&amp;quot;ticks&amp;quot;)&amp;lt;/code&amp;gt; - Get integer milliseconds from game boot.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;br /&gt;
[[Category:OpenBOR Index]]&lt;/div&gt;</summary>
		<author><name>KnownhostService</name></author>
	</entry>
	<entry>
		<id>https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=67</id>
		<title>Time</title>
		<link rel="alternate" type="text/html" href="https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=67"/>
		<updated>2026-07-12T17:22:41Z</updated>

		<summary type="html">&lt;p&gt;KnownhostService: /* Set Time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Timing is crucial to OpenBOR, as it is with most game engines. Understanding how the engine measures time, and how those measurements affect a project, is therefore essential. OpenBOR’s primary unit of time is the &#039;&#039;&#039;centisecond&#039;&#039;&#039;, or one hundredth of a second. Animation delays, for example, are expressed in centiseconds. Other units may be used depending on the feature, circumstance, or design requirement.&lt;br /&gt;
&lt;br /&gt;
Time in OpenBOR is represented by the following primary definitions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Time&#039;&#039;&#039; – The traditional beat ’em up countdown timer that forces players to maintain pace or lose a life when time expires. Game Time is enabled by default, though creators may disable or remove it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Elapsed Time&#039;&#039;&#039; – An integer value reset at the beginning of each active level and incremented on every engine update while the level remains active. Elapsed Time drives much of the engine’s internal timing, including animations, delays, effect duration, and other game-play processes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ticks&#039;&#039;&#039; – The number of milliseconds elapsed since the current game session began. Tick values are primarily used for timing operations outside active game-play, including loading processes and recorded player input.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;System Time -&#039;&#039;&#039; OpenBOR script includes an API to access the host system clock for obtaining real-world dates and times. System clock access is entirely optional and does not affect native engine timing or game-play functionality.&lt;br /&gt;
[[File:Obor clock.png|center|frame|OpenBOR exposes several types of time, including world time and time elapsed since startup.]]&lt;br /&gt;
&lt;br /&gt;
== Game Time ==&lt;br /&gt;
Game time is a default countdown timer that appears at top center of the screen during an active level. It starts at 99 and decrements once every two real world seconds. At 0, all active players take damage equal to their current HP, and the game is over if no lives or credits remain. Time resets automatically when players clear a designated level wait and at the start of each new level. [[File:Batman savage dawn a.png|alt=Batman Savage Dawn screenshot.|center|frame|The Batman Savage Dawn fan game demonstrates OpenBOR&#039;s default game timer in action at top center of the screen.]]&lt;br /&gt;
&lt;br /&gt;
=== Set Time ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;settime {int time}&lt;br /&gt;
&lt;br /&gt;
#default&lt;br /&gt;
settime 99&amp;lt;/syntaxhighlight&amp;gt;Level header command that sets value applied to timer on level start and native resets.&lt;br /&gt;
&lt;br /&gt;
* Accepts any integer value from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;99&amp;lt;/code&amp;gt;. Out of bounds values are ignored. &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = infinite time.&lt;br /&gt;
&lt;br /&gt;
=== HUD Display ===&lt;br /&gt;
For configuring how timer displays on screen, see [[Heads Up Display]].&lt;br /&gt;
&lt;br /&gt;
* [[Heads Up Display#Disable Time Display|Disable Time Display]]&lt;br /&gt;
* [[Heads Up Display#Timer Font|Timer Font]]&lt;br /&gt;
* [[Heads Up Display#Timer Location and Border|Timer Location]]&lt;br /&gt;
* [[Heads Up Display#Timer Icon|Timer Icon]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== data/sounds/timeover.wav ====&lt;br /&gt;
If available, plays once when the game timer expires.&lt;br /&gt;
&lt;br /&gt;
==== anim lose ====&lt;br /&gt;
If available, entity plays this animation in place of normal death when game timer expires. &lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_LOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== anim falllose ====&lt;br /&gt;
If available and entity does not have a lose animation, entity plays this animation in place of normal fall death when game timer expires.&lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_FALLLOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Attack types ====&lt;br /&gt;
Attack types applied to players when game time expires.&lt;br /&gt;
&lt;br /&gt;
* openborconstant(&amp;quot;ATK_TIMEOVER&amp;quot;) - Applied to players without a lose animation.&lt;br /&gt;
* openborconstant(&amp;quot;ATK_LOSE&amp;quot;) - Applied to players with a lose animation.&lt;br /&gt;
&lt;br /&gt;
=== Script API ===&lt;br /&gt;
&lt;br /&gt;
==== Game Time ====&lt;br /&gt;
Current game time is read and write accessible.&lt;br /&gt;
&lt;br /&gt;
===== Get =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int time = openborvariant(&amp;quot;game_time&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Get integer representing game time remaining.&lt;br /&gt;
&lt;br /&gt;
===== Set =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int new_time = 50;&lt;br /&gt;
&lt;br /&gt;
setopenborvariat(&amp;quot;game_time&amp;quot;, new_time);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Set game time remaining.&lt;br /&gt;
&lt;br /&gt;
==== Timetick Event ====&lt;br /&gt;
If available, &amp;lt;code&amp;gt;data/scripts/timetick.c&amp;lt;/code&amp;gt; fires on each game time decrement. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; - Current game time value.&lt;br /&gt;
&lt;br /&gt;
== Ticks ==&lt;br /&gt;
Ticks is a read only measure of milliseconds starting from game boot. OpenBOR natively uses ticks for the player input recording feature and for timing during load screens. Ticks therefore do not generally affect active game-play, but are useful for user content, scripting, and keeping time outside of active game-play elements when increments are not natively incremented. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;openborvariant(&amp;quot;ticks&amp;quot;)&amp;lt;/code&amp;gt; - Get integer milliseconds from game boot.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;br /&gt;
[[Category:OpenBOR Index]]&lt;/div&gt;</summary>
		<author><name>KnownhostService</name></author>
	</entry>
	<entry>
		<id>https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=66</id>
		<title>Time</title>
		<link rel="alternate" type="text/html" href="https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=66"/>
		<updated>2026-07-12T17:15:03Z</updated>

		<summary type="html">&lt;p&gt;KnownhostService: /* Set Time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Timing is crucial to OpenBOR, as it is with most game engines. Understanding how the engine measures time, and how those measurements affect a project, is therefore essential. OpenBOR’s primary unit of time is the &#039;&#039;&#039;centisecond&#039;&#039;&#039;, or one hundredth of a second. Animation delays, for example, are expressed in centiseconds. Other units may be used depending on the feature, circumstance, or design requirement.&lt;br /&gt;
&lt;br /&gt;
Time in OpenBOR is represented by the following primary definitions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Time&#039;&#039;&#039; – The traditional beat ’em up countdown timer that forces players to maintain pace or lose a life when time expires. Game Time is enabled by default, though creators may disable or remove it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Elapsed Time&#039;&#039;&#039; – An integer value reset at the beginning of each active level and incremented on every engine update while the level remains active. Elapsed Time drives much of the engine’s internal timing, including animations, delays, effect duration, and other game-play processes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ticks&#039;&#039;&#039; – The number of milliseconds elapsed since the current game session began. Tick values are primarily used for timing operations outside active game-play, including loading processes and recorded player input.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;System Time -&#039;&#039;&#039; OpenBOR script includes an API to access the host system clock for obtaining real-world dates and times. System clock access is entirely optional and does not affect native engine timing or game-play functionality.&lt;br /&gt;
[[File:Obor clock.png|center|frame|OpenBOR exposes several types of time, including world time and time elapsed since startup.]]&lt;br /&gt;
&lt;br /&gt;
== Game Time ==&lt;br /&gt;
Game time is a default countdown timer that appears at top center of the screen during an active level. It starts at 99 and decrements once every two real world seconds. At 0, all active players take damage equal to their current HP, and the game is over if no lives or credits remain. Time resets automatically when players clear a designated level wait and at the start of each new level. [[File:Batman savage dawn a.png|alt=Batman Savage Dawn screenshot.|center|frame|The Batman Savage Dawn fan game demonstrates OpenBOR&#039;s default game timer in action at top center of the screen.]]&lt;br /&gt;
&lt;br /&gt;
=== Set Time ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;settime {int time}&lt;br /&gt;
&lt;br /&gt;
#default&lt;br /&gt;
settime 99&amp;lt;/syntaxhighlight&amp;gt;Level header command that sets value applied to timer on level start and native resets.&lt;br /&gt;
&lt;br /&gt;
* Accepts any integer value from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;99&amp;lt;/code&amp;gt;. Out of bounds values are ignored. &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = infinite time.&lt;br /&gt;
&lt;br /&gt;
=== HUD Display ===&lt;br /&gt;
For configuring how timer displays on screen, see [[Heads Up Display]].&lt;br /&gt;
&lt;br /&gt;
* [[Heads Up Display#Disable Time Display|Disable Time Display]]&lt;br /&gt;
* [[Heads Up Display#Timer Font|Timer Font]]&lt;br /&gt;
* [[Heads Up Display#Timer Location and Border|Timer Location]]&lt;br /&gt;
* [[Heads Up Display#Timer Icon|Timer Icon]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== data/sounds/timeover.wav ====&lt;br /&gt;
If available, plays once when the game timer expires.&lt;br /&gt;
&lt;br /&gt;
==== anim lose ====&lt;br /&gt;
If available, entity plays this animation in place of normal death when game timer expires. &lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_LOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== anim falllose ====&lt;br /&gt;
If available and entity does not have a lose animation, entity plays this animation in place of normal fall death when game timer expires.&lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_FALLLOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Attack types ====&lt;br /&gt;
Attack types applied to players when game time expires.&lt;br /&gt;
&lt;br /&gt;
* openborconstant(&amp;quot;ATK_TIMEOVER&amp;quot;) - Applied to players without a lose animation.&lt;br /&gt;
* openborconstant(&amp;quot;ATK_LOSE&amp;quot;) - Applied to players with a lose animation.&lt;br /&gt;
&lt;br /&gt;
=== Script API ===&lt;br /&gt;
&lt;br /&gt;
==== Game Time ====&lt;br /&gt;
Current game time is read and write accessible.&lt;br /&gt;
&lt;br /&gt;
===== Get =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int time = openborvariant(&amp;quot;game_time&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Get integer representing game time remaining.&lt;br /&gt;
&lt;br /&gt;
===== Set =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int new_time = 50;&lt;br /&gt;
&lt;br /&gt;
setopenborvariat(&amp;quot;game_time&amp;quot;, new_time);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Set game time remaining.&lt;br /&gt;
&lt;br /&gt;
==== Timetick Event ====&lt;br /&gt;
If available, &amp;lt;code&amp;gt;data/scripts/timetick.c&amp;lt;/code&amp;gt; fires on each game time decrement. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; - Current game time value.&lt;br /&gt;
&lt;br /&gt;
== Ticks ==&lt;br /&gt;
Ticks is a read only measure of milliseconds starting from game boot. OpenBOR natively uses ticks for the player input recording feature and for timing during load screens. Ticks therefore do not generally affect active game-play, but are useful for user content, scripting, and keeping time outside of active game-play elements when increments are not natively incremented. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;openborvariant(&amp;quot;ticks&amp;quot;)&amp;lt;/code&amp;gt; - Get integer milliseconds from game boot.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;br /&gt;
[[Category:OpenBOR Index]]&lt;/div&gt;</summary>
		<author><name>KnownhostService</name></author>
	</entry>
	<entry>
		<id>https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=64</id>
		<title>Time</title>
		<link rel="alternate" type="text/html" href="https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=64"/>
		<updated>2026-07-12T17:07:43Z</updated>

		<summary type="html">&lt;p&gt;KnownhostService: /* Set Time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Timing is crucial to OpenBOR, as it is with most game engines. Understanding how the engine measures time, and how those measurements affect a project, is therefore essential. OpenBOR’s primary unit of time is the &#039;&#039;&#039;centisecond&#039;&#039;&#039;, or one hundredth of a second. Animation delays, for example, are expressed in centiseconds. Other units may be used depending on the feature, circumstance, or design requirement.&lt;br /&gt;
&lt;br /&gt;
Time in OpenBOR is represented by the following primary definitions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Time&#039;&#039;&#039; – The traditional beat ’em up countdown timer that forces players to maintain pace or lose a life when time expires. Game Time is enabled by default, though creators may disable or remove it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Elapsed Time&#039;&#039;&#039; – An integer value reset at the beginning of each active level and incremented on every engine update while the level remains active. Elapsed Time drives much of the engine’s internal timing, including animations, delays, effect duration, and other game-play processes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ticks&#039;&#039;&#039; – The number of milliseconds elapsed since the current game session began. Tick values are primarily used for timing operations outside active game-play, including loading processes and recorded player input.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;System Time -&#039;&#039;&#039; OpenBOR script includes an API to access the host system clock for obtaining real-world dates and times. System clock access is entirely optional and does not affect native engine timing or game-play functionality.&lt;br /&gt;
[[File:Obor clock.png|center|frame|OpenBOR exposes several types of time, including world time and time elapsed since startup.]]&lt;br /&gt;
&lt;br /&gt;
== Game Time ==&lt;br /&gt;
Game time is a default countdown timer that appears at top center of the screen during an active level. It starts at 99 and decrements once every two real world seconds. At 0, all active players take damage equal to their current HP, and the game is over if no lives or credits remain. Time resets automatically when players clear a designated level wait and at the start of each new level. [[File:Batman savage dawn a.png|alt=Batman Savage Dawn screenshot.|center|frame|The Batman Savage Dawn fan game demonstrates OpenBOR&#039;s default game timer in action at top center of the screen.]]&lt;br /&gt;
&lt;br /&gt;
=== Set Time ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
settime {int time}&lt;br /&gt;
&lt;br /&gt;
#default&lt;br /&gt;
settime 99&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Level header command that sets value applied to timer on level start and native resets.&lt;br /&gt;
&lt;br /&gt;
* Accepts any integer value from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;99&amp;lt;/code&amp;gt;. Out of bounds values are ignored. &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = infinite time.&lt;br /&gt;
&lt;br /&gt;
=== HUD Display ===&lt;br /&gt;
For configuring how timer displays on screen, see [[Heads Up Display]].&lt;br /&gt;
&lt;br /&gt;
* [[Heads Up Display#Disable Time Display|Disable Time Display]]&lt;br /&gt;
* [[Heads Up Display#Timer Font|Timer Font]]&lt;br /&gt;
* [[Heads Up Display#Timer Location and Border|Timer Location]]&lt;br /&gt;
* [[Heads Up Display#Timer Icon|Timer Icon]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== data/scripts/timetick.c ====&lt;br /&gt;
If available, fires on each decrement of the game timer. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;time (int)&#039;&#039;&#039; - Current timer value.&lt;br /&gt;
&lt;br /&gt;
==== data/sounds/timeover.wav ====&lt;br /&gt;
If available, plays once when the game timer expires.&lt;br /&gt;
&lt;br /&gt;
==== anim lose ====&lt;br /&gt;
If available, entity plays this animation in place of normal death when game timer expires. &lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_LOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== anim falllose ====&lt;br /&gt;
If available and entity does not have a lose animation, entity plays this animation in place of normal fall death when game timer expires.&lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_FALLLOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Attack types ====&lt;br /&gt;
Attack types applied to players when game time expires.&lt;br /&gt;
&lt;br /&gt;
* openborconstant(&amp;quot;ATK_TIMEOVER&amp;quot;) - Applied to players without a lose animation.&lt;br /&gt;
* openborconstant(&amp;quot;ATK_LOSE&amp;quot;) - Applied to players with a lose animation.&lt;br /&gt;
&lt;br /&gt;
=== Script API ===&lt;br /&gt;
&lt;br /&gt;
==== Game Time ====&lt;br /&gt;
Current game time is read and write accessible.&lt;br /&gt;
&lt;br /&gt;
===== Get =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int time = openborvariant(&amp;quot;game_time&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Get integer representing game time remaining.&lt;br /&gt;
&lt;br /&gt;
===== Set =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int new_time = 50;&lt;br /&gt;
&lt;br /&gt;
setopenborvariat(&amp;quot;game_time&amp;quot;, new_time);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Set game time remaining.&lt;br /&gt;
&lt;br /&gt;
==== Timetick Event ====&lt;br /&gt;
If available, &amp;lt;code&amp;gt;data/scripts/timetick.c&amp;lt;/code&amp;gt; fires on each game time decrement. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; - Current game time value.&lt;br /&gt;
&lt;br /&gt;
== Ticks ==&lt;br /&gt;
Ticks is a read only measure of milliseconds starting from game boot. OpenBOR natively uses ticks for the player input recording feature and for timing during load screens. Ticks therefore do not generally affect active game-play, but are useful for user content, scripting, and keeping time outside of active game-play elements when increments are not natively incremented. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;openborvariant(&amp;quot;ticks&amp;quot;)&amp;lt;/code&amp;gt; - Get integer milliseconds from game boot.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;br /&gt;
[[Category:OpenBOR Index]]&lt;/div&gt;</summary>
		<author><name>KnownhostService</name></author>
	</entry>
	<entry>
		<id>https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=61</id>
		<title>Time</title>
		<link rel="alternate" type="text/html" href="https://chronocrash.com/openbor/wiki/index.php?title=Time&amp;diff=61"/>
		<updated>2026-07-12T17:06:06Z</updated>

		<summary type="html">&lt;p&gt;KnownhostService: /* Set Time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Timing is crucial to OpenBOR, as it is with most game engines. Understanding how the engine measures time, and how those measurements affect a project, is therefore essential. OpenBOR’s primary unit of time is the &#039;&#039;&#039;centisecond&#039;&#039;&#039;, or one hundredth of a second. Animation delays, for example, are expressed in centiseconds. Other units may be used depending on the feature, circumstance, or design requirement.&lt;br /&gt;
&lt;br /&gt;
Time in OpenBOR is represented by the following primary definitions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game Time&#039;&#039;&#039; – The traditional beat ’em up countdown timer that forces players to maintain pace or lose a life when time expires. Game Time is enabled by default, though creators may disable or remove it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Elapsed Time&#039;&#039;&#039; – An integer value reset at the beginning of each active level and incremented on every engine update while the level remains active. Elapsed Time drives much of the engine’s internal timing, including animations, delays, effect duration, and other game-play processes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ticks&#039;&#039;&#039; – The number of milliseconds elapsed since the current game session began. Tick values are primarily used for timing operations outside active game-play, including loading processes and recorded player input.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;System Time -&#039;&#039;&#039; OpenBOR script includes an API to access the host system clock for obtaining real-world dates and times. System clock access is entirely optional and does not affect native engine timing or game-play functionality.&lt;br /&gt;
[[File:Obor clock.png|center|frame|OpenBOR exposes several types of time, including world time and time elapsed since startup.]]&lt;br /&gt;
&lt;br /&gt;
== Game Time ==&lt;br /&gt;
Game time is a default countdown timer that appears at top center of the screen during an active level. It starts at 99 and decrements once every two real world seconds. At 0, all active players take damage equal to their current HP, and the game is over if no lives or credits remain. Time resets automatically when players clear a designated level wait and at the start of each new level. [[File:Batman savage dawn a.png|alt=Batman Savage Dawn screenshot.|center|frame|The Batman Savage Dawn fan game demonstrates OpenBOR&#039;s default game timer in action at top center of the screen.]]&lt;br /&gt;
&lt;br /&gt;
=== Set Time ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
settime {int time}&lt;br /&gt;
&lt;br /&gt;
#default&lt;br /&gt;
settime 99&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Level header command that sets value applied to timer on level start and native resets.&lt;br /&gt;
&lt;br /&gt;
* Accepts any integer value from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;99&amp;lt;/code&amp;gt;. Out of bounds values are ignored. &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = infinite time.&lt;br /&gt;
&lt;br /&gt;
=== HUD Display ===&lt;br /&gt;
For configuring how timer displays on screen, see [[Heads Up Display]].&lt;br /&gt;
&lt;br /&gt;
* [[Heads Up Display#Disable Time Display|Disable Time Display]]&lt;br /&gt;
* [[Heads Up Display#Timer Font|Timer Font]]&lt;br /&gt;
* [[Heads Up Display#Timer Location and Border|Timer Location]]&lt;br /&gt;
* [[Heads Up Display#Timer Icon|Timer Icon]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== data/scripts/timetick.c ====&lt;br /&gt;
If available, fires on each decrement of the game timer. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;time (int)&#039;&#039;&#039; - Current timer value.&lt;br /&gt;
&lt;br /&gt;
==== data/sounds/timeover.wav ====&lt;br /&gt;
If available, plays once when the game timer expires.&lt;br /&gt;
&lt;br /&gt;
==== anim lose ====&lt;br /&gt;
If available, entity plays this animation in place of normal death when game timer expires. &lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_LOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== anim falllose ====&lt;br /&gt;
If available and entity does not have a lose animation, entity plays this animation in place of normal fall death when game timer expires.&lt;br /&gt;
&lt;br /&gt;
* Accessible to script as &amp;lt;code&amp;gt;openborconstant(&amp;quot;ANI_FALLLOSE&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Attack types ====&lt;br /&gt;
Attack types applied to players when game time expires.&lt;br /&gt;
&lt;br /&gt;
* openborconstant(&amp;quot;ATK_TIMEOVER&amp;quot;) - Applied to players without a lose animation.&lt;br /&gt;
* openborconstant(&amp;quot;ATK_LOSE&amp;quot;) - Applied to players with a lose animation.&lt;br /&gt;
&lt;br /&gt;
=== Script API ===&lt;br /&gt;
&lt;br /&gt;
==== Game Time ====&lt;br /&gt;
Current game time is read and write accessible.&lt;br /&gt;
&lt;br /&gt;
===== Get =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int time = openborvariant(&amp;quot;game_time&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Get integer representing game time remaining.&lt;br /&gt;
&lt;br /&gt;
===== Set =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int new_time = 50;&lt;br /&gt;
&lt;br /&gt;
setopenborvariat(&amp;quot;game_time&amp;quot;, new_time);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Set game time remaining.&lt;br /&gt;
&lt;br /&gt;
==== Timetick.c ====&lt;br /&gt;
if available, &amp;lt;code&amp;gt;data/scripts/timetick.c&amp;lt;/code&amp;gt; fires on each game time decrement. Populates the following local variables.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; - Current game time value.&lt;br /&gt;
&lt;br /&gt;
== Ticks ==&lt;br /&gt;
Ticks is a read only measure of milliseconds starting from game boot. OpenBOR natively uses ticks for the player input recording feature and for timing during load screens. Ticks therefore do not generally affect active game-play, but are useful for user content, scripting, and keeping time outside of active game-play elements when increments are not natively incremented. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;openborvariant(&amp;quot;ticks&amp;quot;)&amp;lt;/code&amp;gt; - Get integer milliseconds from game boot.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;br /&gt;
[[Category:OpenBOR Index]]&lt;/div&gt;</summary>
		<author><name>KnownhostService</name></author>
	</entry>
</feed>