Updating inventory verbs (5.3 bug)
The Pixie
11 Jan 2013, 14:20Is there a way to force the inventory verbs to update?
Say I have a container that is closed, I only want "Open" to show at first. However, when the player does open the container, I want it to show "Close" instead. Okay, I can change the attribute easy enough,
this.inventoryverbs = Split ("Look at;Drop;Close", ";")
... but the verbs shown do not get updated unless the player selects another item, then comes back to this one.
Say I have a container that is closed, I only want "Open" to show at first. However, when the player does open the container, I want it to show "Close" instead. Okay, I can change the attribute easy enough,
this.inventoryverbs = Split ("Look at;Drop;Close", ";")
... but the verbs shown do not get updated unless the player selects another item, then comes back to this one.
The Pixie
12 Jan 2013, 14:29I have updated this to be a bug, as it was something that worked okay in 5.2.
Here is an example game. You can break and mend the clock, and in 5.2 the displayverbs are updated immediately; not so in 5.3.
ETA: Logged as issue 1223
Here is an example game. You can break and mend the clock, and in 5.2 the displayverbs are updated immediately; not so in 5.3.
<!--Saved by Quest 5.2.4515.34846-->
<asl version="520">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="inventoryverbtest">
<gameid>04e5973c-9668-4728-aca6-8e00bd9d9182</gameid>
<version>1.0</version>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
</object>
<object name="clock">
<inherit name="editor_object" />
<take type="boolean">false</take>
<displayverbs>Look at; Take; Break</displayverbs>
<break type="script">
msg ("You break the clock")
this.displayverbs = Split ("Look at; Take; Mend", ";")
</break>
<mend type="script">
msg ("You mend the clock")
this.displayverbs = Split ("Look at; Take; Break", ";")
</mend>
</object>
<object name="statue">
<inherit name="editor_object" />
</object>
</object>
<verb>
<property>break</property>
<pattern>break</pattern>
<defaultexpression>"You can't break " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>mend</property>
<pattern>mend</pattern>
<defaultexpression>"You can't mend " + object.article + "."</defaultexpression>
</verb>
</asl>
ETA: Logged as issue 1223