<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://agiwiki.sierrahelp.com//index.php?action=history&amp;feed=atom&amp;title=Set.view.v</id>
	<title>Set.view.v - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://agiwiki.sierrahelp.com//index.php?action=history&amp;feed=atom&amp;title=Set.view.v"/>
	<link rel="alternate" type="text/html" href="http://agiwiki.sierrahelp.com//index.php?title=Set.view.v&amp;action=history"/>
	<updated>2026-09-24T00:25:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>http://agiwiki.sierrahelp.com//index.php?title=Set.view.v&amp;diff=13102&amp;oldid=prev</id>
		<title>Andrew Korson: Created page with &quot;The &#039;&#039;&#039;set.view.v&#039;&#039;&#039; command assigns a view to an object indirectly.  == Syntax ==  set.view.v(obj oA, var vVIEW);  == Remarks ==  View Resour...&quot;</title>
		<link rel="alternate" type="text/html" href="http://agiwiki.sierrahelp.com//index.php?title=Set.view.v&amp;diff=13102&amp;oldid=prev"/>
		<updated>2019-04-22T02:27:25Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The &amp;#039;&amp;#039;&amp;#039;set.view.v&amp;#039;&amp;#039;&amp;#039; command assigns a view to an object indirectly.  == Syntax ==  set.view.v(&lt;a href=&quot;/index.php/Screen_object&quot; title=&quot;Screen object&quot;&gt;obj&lt;/a&gt; oA, &lt;a href=&quot;/index.php/Variable&quot; title=&quot;Variable&quot;&gt;var&lt;/a&gt; vVIEW);  == Remarks ==  View Resour...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;set.view.v&amp;#039;&amp;#039;&amp;#039; command assigns a view to an object indirectly.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
set.view.v([[screen object|obj]] oA, [[variable|var]] vVIEW);&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
&lt;br /&gt;
[[View Resource (AGI)|View]] &amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039; (where &amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039; is the value of [[variable]] &amp;#039;&amp;#039;&amp;#039;vVIEW&amp;#039;&amp;#039;&amp;#039;) is assigned to [[screen object]] &amp;#039;&amp;#039;&amp;#039;oA&amp;#039;&amp;#039;&amp;#039;. The view must be loaded or AGI raises [[trappable error #3]].&lt;br /&gt;
&lt;br /&gt;
When the view is assigned, AGI checks the current [[loop]] value of the screen object against the loop count of the newly assigned view. If the loop value exceeds the new loop count, the object&amp;#039;s loop value is set to zero. This will only be a concern if a screen object gets assigned a view, the loop is changed to a non-zero value, and then a different view is assigned later.&lt;br /&gt;
&lt;br /&gt;
It is possible to assign the same view to multiple screen objects. King&amp;#039;s Quest I does this with the alligators in the moat in the opening scene.&lt;br /&gt;
&lt;br /&gt;
== Possible Errors ==&lt;br /&gt;
&lt;br /&gt;
In [[version]] 2.089 only, AGI raises [[trappable error #2]] if object number &amp;#039;&amp;#039;&amp;#039;oA&amp;#039;&amp;#039;&amp;#039; is invalid. In all later versions, AGI does not check that object number &amp;#039;&amp;#039;&amp;#039;oA&amp;#039;&amp;#039;&amp;#039; is a valid [[screen object]]. If it is not, this command will overwrite other data on the [[memory heap]], which may cause unexpected results, including possibly [[crashing AGI]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&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;
animate.obj(o1);&lt;br /&gt;
v51 = 5;&lt;br /&gt;
load.view.v(v51);&lt;br /&gt;
set.view.v(o1, v51);&lt;br /&gt;
animate.obj(o2);&lt;br /&gt;
set.view.v(o2, v51); [ ok to share a view&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Technical Information ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; width=&amp;quot;200&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Required Interpreter Version:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| width=&amp;quot;175&amp;quot; | Available in all AGI versions.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Byte-Code Value:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| 42 (0x2A hex)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[load.view]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[set.view]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Category:Commands]]&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andrew Korson</name></author>
	</entry>
</feed>