<?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=Move.obj</id>
	<title>Move.obj - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Move.obj"/>
	<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Move.obj&amp;action=history"/>
	<updated>2026-12-01T09:34:02Z</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=Move.obj&amp;diff=69677&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=Move.obj&amp;diff=69677&amp;oldid=prev"/>
		<updated>2025-02-16T20:49:29Z</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 15:49, 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=Move.obj&amp;diff=69676&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=Move.obj&amp;diff=69676&amp;oldid=prev"/>
		<updated>2024-06-03T04:34:33Z</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:34, 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=Move.obj&amp;diff=69675&amp;oldid=prev</id>
		<title>sierraw&gt;Andrew Branscom: 4 revisions imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Move.obj&amp;diff=69675&amp;oldid=prev"/>
		<updated>2022-01-28T16:19:43Z</updated>

		<summary type="html">&lt;p&gt;4 revisions imported&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;move.obj&amp;#039;&amp;#039;&amp;#039; command sets an object&amp;#039;s [[movement mode]] to &amp;#039;move object&amp;#039;, meaning it will move toward a specified screen coordinate.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
move.obj([[screen object|obj]] oA, [[number|byt]] X, [[number|byt]] Y, [[number|byt]] STEP, [[flag|flg]] fDONE);&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
&lt;br /&gt;
[[Screen object]] &amp;#039;&amp;#039;&amp;#039;oA&amp;#039;&amp;#039;&amp;#039; begins moving toward the point (&amp;#039;&amp;#039;&amp;#039;X&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Y&amp;#039;&amp;#039;&amp;#039;). AGI calculates the best direction based on distance from the point. The screen object will move &amp;#039;&amp;#039;&amp;#039;STEP&amp;#039;&amp;#039;&amp;#039; pixels each step. If &amp;#039;&amp;#039;&amp;#039;STEP&amp;#039;&amp;#039;&amp;#039; is zero, the screen object&amp;#039;s current [[step size]] is used. When the [[screen object]] is less than &amp;#039;&amp;#039;&amp;#039;STEP&amp;#039;&amp;#039;&amp;#039; pixels away from point (&amp;#039;&amp;#039;&amp;#039;X&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Y&amp;#039;&amp;#039;&amp;#039;), the screen object&amp;#039;s direction is set to 0, flag &amp;#039;&amp;#039;&amp;#039;fDONE&amp;#039;&amp;#039;&amp;#039; is set to TRUE, and the [[screen object]] switches to normal motion. The screen object&amp;#039;s original step size is restored.&lt;br /&gt;
&lt;br /&gt;
Flag &amp;#039;&amp;#039;&amp;#039;fDONE&amp;#039;&amp;#039;&amp;#039; is reset to FALSE when the command is executed.&lt;br /&gt;
&lt;br /&gt;
Setting the movement mode to &amp;#039;move object&amp;#039; will automatically enable the [[screen object]] for [[updating]] if not currently enabled. The [[cycling property]] is not modified by the &amp;#039;&amp;#039;&amp;#039;move.obj&amp;#039;&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;oA&amp;#039;&amp;#039;&amp;#039; is [[ego]], it automatically switches to [[program.control|program control mode]]. It also returns to [[player.control|player control mode]] automatically when it reaches its target location.&lt;br /&gt;
&lt;br /&gt;
If you use the &amp;#039;&amp;#039;&amp;#039;[[set.dir]]&amp;#039;&amp;#039;&amp;#039; command when a [[screen object|screen object&amp;#039;s]] motion is set to move to a point, the screen object will move in that direction for one [[interpreter cycle]], but will begin moving toward the end point again after that.&lt;br /&gt;
&lt;br /&gt;
== Possible Errors ==&lt;br /&gt;
&lt;br /&gt;
AGI does not check that screen 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;
If either &amp;#039;&amp;#039;&amp;#039;X&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;Y&amp;#039;&amp;#039;&amp;#039; are off screen (&amp;#039;&amp;#039;&amp;#039;X&amp;#039;&amp;#039;&amp;#039; &amp;gt;= 160; &amp;#039;&amp;#039;&amp;#039;Y&amp;#039;&amp;#039;&amp;#039; &amp;gt;= 168), the command behaves a bit differently. As soon as the [[screen object]] reaches an edge, AGI will set flag &amp;#039;&amp;#039;&amp;#039;fDONE&amp;#039;&amp;#039;&amp;#039; to TRUE, and switch the screen object to normal motion, but the screen object&amp;#039;s direction is not set to zero. If the [[screen object]] was moving diagonally when it touched the edge, it will continue moving along the edge since its direction was not set to zero. To avoid unintentional results, it is best to avoid using invalid values for &amp;#039;&amp;#039;&amp;#039;X&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Y&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;WARNING&amp;#039;&amp;#039;&amp;#039;: If your game relies on the flag &amp;#039;&amp;#039;&amp;#039;fDONE&amp;#039;&amp;#039;&amp;#039; to be set before continuing with something, such as going to the next part of a cut scene, make sure that the screen object will always be able to reach its destination. It is possible that it could get caught behind a barrier or something, and not be able to get where it needs to go, in which case the game will sit there forever doing nothing. This is more of a problem when the screen object being moved is [[ego]] - it might work fine from where you test it, but it may be possible for the player to move ego into such a position where they will get “stuck” when being moved.&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;move.obj(o1, 120, 44, 2, f99);&lt;br /&gt;
[ object will move to the point (120, 44), &lt;br /&gt;
[ two pixels per step&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;
| 81 (0x51 hex)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[move.obj.v]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[set.dir]]&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>sierraw&gt;Andrew Branscom</name></author>
	</entry>
</feed>