Is this a bug?

imamy
01 Aug 2013, 21:12
I'm using the Quest Online Version.

I wanted to print the Room name, Description, Objects, and then Exits.

So I changed the Room Description layout order from 1, 2, 3, 4 to 1, 3, 4, 2 and noticed that the initial "look" printed the visible objects twice (see red circle). Everything works as it should with a second "look".

Is there a way to stop it from printing out the objects twice?

<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Notes">
<gameid>8846e664-bf00-43ba-ac46-82f906cda9ef</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<description></description>
<menufont>Georgia, serif</menufont>
<attr name="autodescription_youcansee" type="int">3</attr>
<attr name="autodescription_youcango" type="int">4</attr>
<attr name="autodescription_description" type="int">2</attr>
</game>
<object name="room">
<inherit name="editor_room" />
<description type="script">
MoveObject (player, Test R1)
</description>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
<object name="Test R1">
<inherit name="editor_room" />
<description>A plain room made for testing.</description>
<object name="Test O1">
<inherit name="editor_object" />
</object>
<exit alias="east" to="Test R2">
<inherit name="eastdirection" />
</exit>
</object>
<object name="Test R2">
<inherit name="editor_room" />
<description>Another room made for testing.</description>
<exit alias="west" to="Test R1">
<inherit name="westdirection" />
</exit>
</object>
</asl>
ta - example 2.png
ta - example 1.png

jaynabonne
01 Aug 2013, 22:25
You're moving the player to a different room in the description script, which occurs part way into the overall room decription dump. After that script returns, it dumps out the objects, etc, which are now for the new room. But moving to a new room also causes the description for that room to be dumped (which happens during the move). So you end up with the objects dumped twice.

Basically, don't do that. The description script should be for outputting a description. If you want to move the player, do it in some other script (like a "after entering the room" or something).

imamy
01 Aug 2013, 23:08
Ah, okay :) Thanks.