<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.deltaworlds.com/index.php?action=history&amp;feed=atom&amp;title=At</id>
	<title>At - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.deltaworlds.com/index.php?action=history&amp;feed=atom&amp;title=At"/>
	<link rel="alternate" type="text/html" href="https://wiki.deltaworlds.com/index.php?title=At&amp;action=history"/>
	<updated>2026-05-03T17:23:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.deltaworlds.com/index.php?title=At&amp;diff=85&amp;oldid=prev</id>
		<title>Xan: Created page with &quot;{{feature|1164|5.1}}  The &#039;&#039;&#039;at&#039;&#039;&#039; trigger will activate commands after a set amount of time, or at a scheduled time in VRT.  This trigger was added in version 5.1 in conjunction with the timer command as an easier and more accessible way for users to create timed events.  Previously, builders could only create timed events by a complicated workaround using the animate command.  ==Usage==  &#039;&#039;&#039;at&#039;&#039;&#039; tm &#039;&#039;tmName&#039;&#039; &#039;&#039;time-coun...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.deltaworlds.com/index.php?title=At&amp;diff=85&amp;oldid=prev"/>
		<updated>2023-05-04T23:25:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{feature|1164|5.1}}  The &amp;#039;&amp;#039;&amp;#039;at&amp;#039;&amp;#039;&amp;#039; trigger will activate commands after a set amount of time, or at a scheduled time in &lt;a href=&quot;/index.php?title=VRT&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;VRT (page does not exist)&quot;&gt;VRT&lt;/a&gt;.  This trigger was added in version &lt;a href=&quot;/index.php?title=5.1&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;5.1 (page does not exist)&quot;&gt;5.1&lt;/a&gt; in conjunction with the &lt;a href=&quot;/index.php/Timer&quot; title=&quot;Timer&quot;&gt;timer&lt;/a&gt; &lt;a href=&quot;/index.php?title=Category:Building_Commands&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:Building Commands (page does not exist)&quot;&gt;command&lt;/a&gt; as an easier and more accessible way for users to create timed events.  Previously, builders could only create timed events by a complicated workaround using the &lt;a href=&quot;/index.php/Animate&quot; title=&quot;Animate&quot;&gt;animate&lt;/a&gt; command.  ==Usage==  &amp;#039;&amp;#039;&amp;#039;at&amp;#039;&amp;#039;&amp;#039; tm &amp;#039;&amp;#039;tmName&amp;#039;&amp;#039; &amp;#039;&amp;#039;time-coun...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{feature|1164|5.1}}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;at&amp;#039;&amp;#039;&amp;#039; trigger will activate commands after a set amount of time, or at a scheduled time in [[VRT]].  This trigger was added in version [[5.1]] in conjunction with the [[timer]] [[:Category:Building Commands|command]] as an easier and more accessible way for users to create timed events.  Previously, builders could only create timed events by a complicated workaround using the [[animate]] command.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;at&amp;#039;&amp;#039;&amp;#039; tm &amp;#039;&amp;#039;tmName&amp;#039;&amp;#039; &amp;#039;&amp;#039;time-count&amp;#039;&amp;#039; [loop], &amp;lt;command&amp;gt;&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;at&amp;#039;&amp;#039;&amp;#039; VRT hh:mm:ss, &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Execute an action command when a timer reaches a certain &amp;#039;&amp;#039;time-count&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==loop-option==&lt;br /&gt;
The option &amp;#039;&amp;#039;loop&amp;#039;&amp;#039; tells the at trigger to repeat the trigger in an interval given by &amp;#039;&amp;#039;time-counter&amp;#039;&amp;#039;. For example, if &amp;#039;&amp;#039;time-count&amp;#039;&amp;#039; is set to 1000, it will repeat the command at 1000, 2000, 3000, etc until the timer stops.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Timers===&lt;br /&gt;
 create [[timer]] ABC 10000 loop=3; at tm ABC 1000, color red&lt;br /&gt;
&lt;br /&gt;
The at trigger is intended to be used in conjunction with the timer command.  The example above details the use of the [[create]] trigger to create a timer and the at trigger to activate the desired command—or effect—of the timer.&lt;br /&gt;
&lt;br /&gt;
===Multiple Events With A Single Timer===&lt;br /&gt;
 create [[timer]] ABC2 5000 loop=3; at tm ABC2 1000, noise sound1.wav;at tm ABC2 2500, noise sound2.wav;at tm ABC2 5000, noise sound3.wav&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This example shows you that multiple events can be triggered from a single timer.  In this example, when the timer ABC2 is created, it begins counting up to 5000 milliseconds (5 seconds) and then loops three times.  Each time the timer hits 2500ms, it will play sound2.wav, and each time it hits 5000 it will play sound3.wav.  In this example, each sound plays three times, in an alternating pattern.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example, looping at-trigger and stopping a timer:&lt;br /&gt;
&lt;br /&gt;
  activate timer TIMI &amp;quot;-1&amp;quot; reset;  at tm TIMI 1500 loop,  move 1 1 1 smooth time=.5;  at tm TIMI 16500, timer TIMI stop;&lt;br /&gt;
&lt;br /&gt;
Here we set an infinite timer (&amp;quot;-1&amp;quot;), not to worry about the total time. The option &amp;#039;&amp;#039;reset&amp;#039;&amp;#039; with the timer just tells it to allow multiple click-starts for re-activating the whole timer.&lt;br /&gt;
&lt;br /&gt;
The first at-trigger is set to loop, repeating the command(s) every 1500 ms (1.5 seconds). The second at-trigger will stop the timer named TIMI, and halt further animation of the object.&lt;br /&gt;
&lt;br /&gt;
Note, if you want to repeat the action exactly 10 times, you have to stop the trigger at 1500 + 1500*10 (16500), since the first animation will be applied at 1500 not at 0. Also, the order of the at-trigger matters here, since if the timer was stopped in the 1st at-trigger, the timer would be dead in the 2nd at-trigger already.&lt;br /&gt;
&lt;br /&gt;
Alternative representation of this example&amp;#039;s logic:&lt;br /&gt;
 // infinite timer (endless loop)&lt;br /&gt;
 while (++counter) {&lt;br /&gt;
   // 1st at-trigger:&lt;br /&gt;
   if (counter % 1500 == 0)&lt;br /&gt;
     execute(&amp;quot;move 1 1 1 smooth time=.5&amp;quot;);&lt;br /&gt;
   // 2nd at-trigger:&lt;br /&gt;
   if (counter == 16500)&lt;br /&gt;
     break;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The last example is equivalent to: definite timer, no explicit stop required:&lt;br /&gt;
 activate timer TIMJ 16500 reset;  at tm TIMJ 1500 loop,  move 1 1 1 smooth time=.5;&lt;br /&gt;
&lt;br /&gt;
===Scheduled Events===&lt;br /&gt;
Scheduled Events can be based on VRT time.  &amp;quot;VRT&amp;quot; is a special word, always referring to the universe clock, scheduled for a certain time, or scheduled for a specified repeating interval synchronized to the universe clock. If &amp;quot;VRT&amp;quot; is used for the reference name to a timer, the &amp;quot;create timer&amp;quot; statement is not needed, and ignored when used, what also renders a &amp;quot;create timer VRT...&amp;quot; statement invalid consequently.&lt;br /&gt;
&lt;br /&gt;
To schedule an event to be triggered daily at 6pm VRT use (time given in 24 hour format):&lt;br /&gt;
&lt;br /&gt;
 at VRT 18:00:00, &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To schedule an event to be triggered once an hour, 20 minutes after each full hour use:&lt;br /&gt;
&lt;br /&gt;
 at VRT hh:20:00, &amp;lt;command&amp;gt;&lt;br /&gt;
 or&lt;br /&gt;
 at VRT :20:00, &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To schedule an event to be triggered every minute, 10 seconds after each full minute use:&lt;br /&gt;
&lt;br /&gt;
 at VRT hh:mm:10, &amp;lt;command&amp;gt;&lt;br /&gt;
 or&lt;br /&gt;
 at VRT ::10, &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Build}}&lt;br /&gt;
[[Category:5.1]]&lt;br /&gt;
[[Category:Triggers]]&lt;/div&gt;</summary>
		<author><name>Xan</name></author>
	</entry>
</feed>