<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://sciwiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Moving_a_Prop_from_Inventory_to_Room</id>
	<title>Moving a Prop from Inventory to Room - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://sciwiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Moving_a_Prop_from_Inventory_to_Room"/>
	<link rel="alternate" type="text/html" href="http://sciwiki.sierrahelp.com/index.php?title=Moving_a_Prop_from_Inventory_to_Room&amp;action=history"/>
	<updated>2026-09-23T16:21:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>http://sciwiki.sierrahelp.com/index.php?title=Moving_a_Prop_from_Inventory_to_Room&amp;diff=348&amp;oldid=prev</id>
		<title>Andrew Branscom: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://sciwiki.sierrahelp.com/index.php?title=Moving_a_Prop_from_Inventory_to_Room&amp;diff=348&amp;oldid=prev"/>
		<updated>2013-08-05T21:45:46Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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 21:45, 5 August 2013&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://sciwiki.sierrahelp.com/index.php?title=Moving_a_Prop_from_Inventory_to_Room&amp;diff=347&amp;oldid=prev</id>
		<title>Andrew Branscom: moved Moving an Object from Inventory to Room to Moving a Prop from Inventory to Room</title>
		<link rel="alternate" type="text/html" href="http://sciwiki.sierrahelp.com/index.php?title=Moving_a_Prop_from_Inventory_to_Room&amp;diff=347&amp;oldid=prev"/>
		<updated>2011-01-23T00:00:33Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/index.php?title=Moving_an_Object_from_Inventory_to_Room&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Moving an Object from Inventory to Room (page does not exist)&quot;&gt;Moving an Object from Inventory to Room&lt;/a&gt; to &lt;a href=&quot;/index.php/Moving_a_Prop_from_Inventory_to_Room&quot; title=&quot;Moving a Prop from Inventory to Room&quot;&gt;Moving a Prop from Inventory to Room&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;By troflip&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To make an object in inventory, such as a key, appear on the screen and be removed from the inventory, if the inventory item is identified with INV_KEY, you can use this code.&lt;br /&gt;
&lt;br /&gt;
In your room, define a key Prop:&lt;br /&gt;
&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;sci&amp;quot; class=&amp;quot;cs&amp;quot;&amp;gt;&lt;br /&gt;
(instance keyOnTable of Prop&lt;br /&gt;
    (properties&lt;br /&gt;
        x 100&lt;br /&gt;
        y 130&lt;br /&gt;
        view 100&lt;br /&gt;
    )&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In your room&amp;#039;s init method:&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;sci&amp;quot; class=&amp;quot;cs&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// If the inventory key is owned by this room, make the &amp;quot;key on table&amp;quot; visual show up:&lt;br /&gt;
(var invItem)&lt;br /&gt;
(= invItem (send gInv:at(INV_KEY)))&lt;br /&gt;
(if (send invItem:ownedBy(gRoomNumber))&lt;br /&gt;
    (keyOnTable:init())&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then in the RoomScript&amp;#039;s handleEVent method:&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;sci&amp;quot; class=&amp;quot;cs&amp;quot;&amp;gt;&lt;br /&gt;
(if (Said(&amp;#039;put/key/table&amp;#039;))&lt;br /&gt;
    (if (send gEgo:has(INV_KEY))&lt;br /&gt;
        (send gEgo:put(INV_KEY gRoomNumber)) // Give inventory key from the ego to the room&lt;br /&gt;
        (keyOnTable:init())                  // Make the &amp;quot;key on table&amp;quot; visual show up&lt;br /&gt;
    )&lt;br /&gt;
    (else&lt;br /&gt;
        Print(&amp;quot;You don&amp;#039;t have the key&amp;quot;)&lt;br /&gt;
    )&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Inventory]]&lt;br /&gt;
[[Category:Props]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
[[Category:Examples]]&lt;/div&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
</feed>