Standing on stuff

The Pixie
Here is a demo game showing one way to handle standing on objects. The cunning part is it has an exit that it adds to a room when the player stands on a chair, so the player can type DOWN to get off the chair.

Objects that can be stood on need to be of the "standonobject" type. you also need to have a script to run when the player leaves a room with a stand on object in it (if the object can be moved, you might want to think about changing the "go" command to handle it).

Can anyone think of any synonyms I should add for STAND ON and GET OFF? I drew a blank.

<!--Saved by Quest 5.5.5328.26617-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="stand_on_demo">
<gameid>34dfa40d-a2c5-4436-a313-85beb595fe57</gameid>
<version>1.0</version>
<firstpublished>2014</firstpublished>
</game>
<verb>
<property>standon</property>
<pattern>stand on;climb on;get on</pattern>
<defaultexpression>"You can't stand on " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>getoff</property>
<pattern>get off;climb off;get down</pattern>
<defaultexpression>"You can't get off " + object.article + "."</defaultexpression>
</verb>
<object name="room">
<inherit name="editor_room" />
<onexit type="script">
if (not player.stoodon = null) {
do (exit_get_down_from_chair, "script")
}
</onexit>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
<object name="chair">
<inherit name="editor_object" />
<inherit name="standonobject" />
<alias>chair</alias>
</object>
<object name="table">
<inherit name="editor_object" />
<inherit name="standonobject" />
<alias>table</alias>
</object>
<exit alias="east" to="room2">
<inherit name="eastdirection" />
</exit>
<object name="teapot">
<inherit name="editor_object" />
<take />
</object>
</object>
<object name="room2">
<inherit name="editor_room" />
<exit alias="west" to="room">
<inherit name="westdirection" />
</exit>
</object>
<object name="nowhere">
<inherit name="editor_room" />
<exit name="exit_get_down_from_chair" alias="down">
<inherit name="downdirection" />
<runscript />
<script type="script">
msg ("You get down from the " + player.stoodon.alias + ".")
this.parent = nowhere
player.stoodon = null
</script>
</exit>
</object>
<type name="standonobject">
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
<value>Stand on</value>
<value>Get off</value>
</displayverbs>
<standon type="script">
player.stoodon = this
msg ("You stand on the " + this.alias + ", perhaps you can see the ceiling better from up here.")
exit_get_down_from_chair.parent = player.parent
exit_get_down_from_chair.to = player.parent
</standon>
<getoff type="script">
do (exit_get_down_from_chair, "script")
</getoff>
</type>
</asl>

Silver
get on, climb on.

climb down, get down.

'get' might be a tricky one as it's already used in IF as a synonym of take isn't it?

The Pixie
Thanks, I have updated it to include those. Seems to work out which get is which okay.

HegemonKhan
for us computer or horse people: mount~dismount

ascend~descend, scale (he scaled up~down the wall, not sure of an antonym though), withdraw~remove (not sure of an antonym though), jump~hop up~down, scrambled~clambered off~down~on~up, stepped up~down on~off,

This topic is now closed. Topics are closed after 14 days of inactivity.

Support

Forums