<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=AGI_Indirect_Command</id>
	<title>AGI Indirect Command - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=AGI_Indirect_Command"/>
	<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=AGI_Indirect_Command&amp;action=history"/>
	<updated>2026-12-03T12:01:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=AGI_Indirect_Command&amp;diff=88806&amp;oldid=prev</id>
		<title>Andrew Branscom at 00:09, 2 April 2025</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=AGI_Indirect_Command&amp;diff=88806&amp;oldid=prev"/>
		<updated>2025-04-02T00:09:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:09, 1 April 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the above code, both commands load VIEW.020, but &amp;lt;code&amp;gt;load.view&amp;lt;/code&amp;gt; is direct because it accepts the actual number of the [[AGI View Resource|view resource]] that should be loaded. The &amp;lt;code&amp;gt;load.view.v&amp;lt;/code&amp;gt; command is indirect because it does not accept the actual number of the resource that should be loaded. You have to put the number into a variable and give that to the &amp;lt;code&amp;gt;load.view.v&amp;lt;/code&amp;gt; command.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the above code, both commands load VIEW.020, but &amp;lt;code&amp;gt;load.view&amp;lt;/code&amp;gt; is direct because it accepts the actual number of the [[AGI View Resource|view resource]] that should be loaded. The &amp;lt;code&amp;gt;load.view.v&amp;lt;/code&amp;gt; command is indirect because it does not accept the actual number of the resource that should be loaded. You have to put the number into a variable and give that to the &amp;lt;code&amp;gt;load.view.v&amp;lt;/code&amp;gt; command.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This probably seems like more work than is necessary, and in many cases it is. But indirect commands do have an advantage over direct commands, namely that they are more flexible. For example, the following code, from the [[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;agiw:&lt;/del&gt;AGI Studio Template Game|AGI Studio Template Game]], allows the player to teleport to any [[ROOM (AGI)|room]] in the game by entering the room number:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This probably seems like more work than is necessary, and in many cases it is. But indirect commands do have an advantage over direct commands, namely that they are more flexible. For example, the following code, from the [[AGI Studio Template Game|AGI Studio Template Game]], allows the player to teleport to any [[ROOM (AGI)|room]] in the game by entering the room number:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=AGI_Indirect_Command&amp;diff=54443&amp;oldid=prev</id>
		<title>Andrew Branscom: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=AGI_Indirect_Command&amp;diff=54443&amp;oldid=prev"/>
		<updated>2025-02-16T13:03:44Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:03, 16 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=AGI_Indirect_Command&amp;diff=54442&amp;oldid=prev</id>
		<title>Andrew Branscom: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=AGI_Indirect_Command&amp;diff=54442&amp;oldid=prev"/>
		<updated>2024-06-03T04:26:35Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:26, 2 June 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=AGI_Indirect_Command&amp;diff=54441&amp;oldid=prev</id>
		<title>sierraw&gt;Andrew Branscom: /*  Also See */</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=AGI_Indirect_Command&amp;diff=54441&amp;oldid=prev"/>
		<updated>2022-02-08T23:57:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Also See&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:AGI Pages]]&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot; style=&amp;quot;font-size: 22pt&amp;quot;&amp;gt;AGI Indirect Command&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An indirect command is a [[AGI Logic Resource|logic]] command that requires the number of a [[AGI Resources|resource]] to be specified but uses a [[Variable (AGI)|variable]] to specify the resource number. For example compare the direct command &amp;lt;code&amp;gt;load.view&amp;lt;/code&amp;gt; to the indirect command &amp;lt;code&amp;gt;load.view.v&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
load.view(20);&lt;br /&gt;
&lt;br /&gt;
v200 = 20;&lt;br /&gt;
load.view.v(v200);&lt;br /&gt;
&lt;br /&gt;
In the above code, both commands load VIEW.020, but &amp;lt;code&amp;gt;load.view&amp;lt;/code&amp;gt; is direct because it accepts the actual number of the [[AGI View Resource|view resource]] that should be loaded. The &amp;lt;code&amp;gt;load.view.v&amp;lt;/code&amp;gt; command is indirect because it does not accept the actual number of the resource that should be loaded. You have to put the number into a variable and give that to the &amp;lt;code&amp;gt;load.view.v&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
This probably seems like more work than is necessary, and in many cases it is. But indirect commands do have an advantage over direct commands, namely that they are more flexible. For example, the following code, from the [[agiw:AGI Studio Template Game|AGI Studio Template Game]], allows the player to teleport to any [[ROOM (AGI)|room]] in the game by entering the room number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;agi&amp;quot;&amp;gt;&lt;br /&gt;
if (said(&amp;quot;tp&amp;quot;)) {&lt;br /&gt;
  get.num(&amp;quot;new room: &amp;quot;, v255);&lt;br /&gt;
  new.room.v(v255);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is not possible without indirect commands, because there is no way to know ahead of time which room the player will want to teleport to. The alternate approach of having up to 254 different commands for teleporting to each of the possible rooms in the game is obviously no good.&lt;br /&gt;
&lt;br /&gt;
Indirect command listing&lt;br /&gt;
&lt;br /&gt;
The following is a list of all the indirect commands in AGI logic. Most indirect commands end in &amp;lt;code&amp;gt;.v&amp;lt;/code&amp;gt;, but there are exceptions to this rule. Also, not all commands that end in &amp;lt;code&amp;gt;.v&amp;lt;/code&amp;gt; are indirect commands.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;[[add.to.pic.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[call.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[cycle.time]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[discard.view.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[display.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[draw.pic]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[get.room.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[get.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[load.logics.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[load.pic]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[load.view.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[move.obj.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[new.room.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[obj.status.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[overlay.pic]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[position.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[print.at.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[print.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[put.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[reposition]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[reposition.to.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[reset.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[set.cel.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[set.dir]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[set.loop.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[set.priority.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[set.view.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[set.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[show.obj.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[step.size]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[step.time]]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[toggle.v]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;br /&amp;gt; References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;br /&amp;gt; Also See ==&lt;br /&gt;
&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical Info]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:References]]&lt;br /&gt;
[[Category:AGI References]]&lt;br /&gt;
[[Category:Commands]]&lt;br /&gt;
[[Category:AGI Commands]]&lt;/div&gt;</summary>
		<author><name>sierraw&gt;Andrew Branscom</name></author>
	</entry>
</feed>