Help with verbs, desiring tutorials

tyconger192
I want to know how I can make it so a player can pull up a carpet with a utility knife, but can have the option to pull up the carpet only after he/she/it has obtained the utility knife. Likewise I would like to know how to allow the player to be given the option to move the utility knife into a dresser only if that player is in a room with the dresser and carrying the utility knife. I also wish that there were some tutorial videos diving into everything quest has to offer, I think it is really unfair that the tutorials are minimal and it is nearly impossible for myself and probably others to get a clear understanding of the Quest program. I hope that in the future we won't have to suffer not knowing how to do certain things and that everything will be easy to understand. For the time being I take great frustration in knowing I am incapable of using all of Quest's convenient features.

-Tyconger192

XanMag
I have created a short game to show you how that works. Click on code view in the GUI editor of a NEW game. Copy-paste all the code below over top of everything in the new game. Then, exit code view and you can see how I set it up using the GUI. I added a trapdoor that you can enter after pulling up the carpet. Ignore the other gibberish you see in there. I was testing some other stuff.

<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Test Characters">
<gameid>34140a79-4073-431d-8efa-ebf486f930ef</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
<attr name="autodescription_Iamin_useprefix" type="boolean">false</attr>
<pov type="object">Fred</pov>
<start type="script">
</start>
</game>
<object name="A">
<inherit name="editor_room" />
<description type="string"></description>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<enter type="script">
if (RandomChance(50)) {
MoveObjectHere (Ned)
if (ListContains(ScopeVisible(), Ned)) {
msg ("You are in Room A with Ned.")
}
else {
msg ("You are in Room A by yourself.")
}
}
</enter>
<onexit type="script">
MoveObject (Ned, Dead Room)
</onexit>
<exit alias="north" to="D">
<inherit name="northdirection" />
</exit>
<exit alias="south" to="B">
<inherit name="southdirection" />
</exit>
<object name="backpack">
<inherit name="editor_object" />
<inherit name="container_open" />
<look>It is a backpack.</look>
<alt type="stringlist">
<value>pack</value>
<value>bag</value>
</alt>
<take />
<feature_container />
<listchildren />
</object>
<object name="apple">
<inherit name="editor_object" />
<look>It's a red apple.</look>
<take />
</object>
<object name="banana">
<inherit name="editor_object" />
<look>It's a yellow banana.</look>
<take />
</object>
<object name="HKs head">
<inherit name="editor_object" />
<alias>HK's head</alias>
<look>It is the ugliest thing you have every seen. lol</look>
<take />
</object>
</object>
<object name="B">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<exit alias="south" to="C">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="A">
<inherit name="northdirection" />
</exit>
<object name="carpet">
<inherit name="editor_object" />
<look type="script">
if (GetBoolean(carpet, "peeled")) {
msg ("You have cut the carpet and pulled it off the floor revealing a trap door beneath. The remnants of the carpet lie in a heap in the corner.")
}
else {
msg ("The carpet in this room is ugly and loosely attached to the floor.")
}
</look>
<usedefaultprefix />
<feature_usegive />
<useon type="scriptdictionary">
<item key="utility knife">
msg ("You bend down and cut the loose carpet with the knife and give it a good pull. The carpet peels back and you see a trap door beneath.")
SetObjectFlagOn (carpet, "peeled")
MoveObject (trap door, B)
</item>
</useon>
<pull>You pull on the carpet, but it is stuck to the floor just tightly enough that you cannot pull it with your bare hands.</pull>
<lift>You pull on the carpet, but it is stuck to the floor just tightly enough that you cannot pull it with your bare hands.</lift>
<takemsg>You have no need to take the ugly carpet so you leave it be.</takemsg>
</object>
<exit name="trapdoorlock1" alias="down" to="basement">
<inherit name="downdirection" />
<locked />
<scenery type="boolean">false</scenery>
<visible type="boolean">false</visible>
<lockmessage>That way is blocked by a trap door</lockmessage>
</exit>
</object>
<object name="C">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<exit alias="south" to="D">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="B">
<inherit name="northdirection" />
</exit>
<object name="utility knife">
<inherit name="editor_object" />
<look>It is a standard box-cutter utility knife.</look>
<take />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>a</prefix>
</object>
</object>
<object name="D">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<exit alias="south" to="A">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="C">
<inherit name="northdirection" />
</exit>
<object name="Fred">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="namedmale" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<attr name="pov_alias">me</attr>
<attr name="pov_gender">I</attr>
<attr name="pov_article">myself</attr>
<visible type="boolean">false</visible>
<gender>me</gender>
<article>mine</article>
<alias>I</alias>
</object>
<object name="dresser">
<inherit name="editor_object" />
<inherit name="container_open" />
<feature_container />
<isopen type="boolean">false</isopen>
<openmsg>You open the dresser.</openmsg>
<closemsg>You close the dresser.</closemsg>
<hidechildren />
<listchildren />
<look>It is a dresser.</look>
<scenery type="boolean">false</scenery>
</object>
</object>
<command name="be dread">
<pattern>be dread</pattern>
<script>
if (ListContains(ScopeVisible(), Dread)) {
ChangePOV (Dread)
}
</script>
</command>
<command name="be ned">
<pattern>be ned</pattern>
<script>
if (ListContains(ScopeVisible(), Ned)) {
ChangePOV (Ned)
}
else {
msg ("Ned ain't here.")
}
</script>
</command>
<command name="be fred">
<pattern>be fred</pattern>
<script>
if (ListContains(ScopeVisible(), Fred)) {
ChangePOV (Fred)
}
</script>
</command>
<object name="Dead Room">
<inherit name="editor_room" />
<object name="Dread">
<inherit name="editor_object" />
<inherit name="namedmale" />
<inherit name="editor_player" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<look>It's Dread.</look>
<feature_player />
</object>
<object name="Ned">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="namedmale" />
<inherit name="switchable" />
<feature_player />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<attr name="feature_switchable" type="boolean">false</attr>
<switchonmsg>You have turned Ned on. Creep.</switchonmsg>
<switchoffmsg>Ned is turned off by your efforts. Weird.</switchoffmsg>
<take />
<takemsg>You grunt with all your might and pick Ned up, but immediately put him back down.</takemsg>
<ontake type="script">
MoveObjectHere (Ned)
</ontake>
</object>
<object name="trap door">
<inherit name="editor_object" />
<inherit name="openable" />
<look>It is a trap door and it is centered in the middle of the now exposed floor.</look>
<feature_container />
<openscript type="script">
msg ("You pull open the trap door and darkness is revealed below.")
HelperOpenObject (trap door)
UnlockExit (trapdoorlock1)
MakeExitVisible (trapdoorlock1)
</openscript>
</object>
</object>
<verb>
<property>lift</property>
<pattern>lift</pattern>
<defaultexpression>"You can't lift " + object.article + "."</defaultexpression>
</verb>
<object name="basement">
<inherit name="editor_room" />
<description>It's dark in here.</description>
<exit alias="up" to="B">
<inherit name="updirection" />
</exit>
</object>
</asl>


Let me know if you have questions!

XanMag

XanMag
Also, my method may not be standard. Never is.

I created a room called 'dead room' where I keep all the stuff I want to move in and out of rooms as I want them to happen.

I did NOT add a specific command to cut the carpet. I simply chose to 'use Knife on carpet'
to achieve desired effect. If you want to add a specific command, right click room 'B' in the editor and then click add command. In the box immediately under 'command pattern', you can type in something like:

cut carpet with knife; use knife to loosen carpet; lift carpet with knife; use knife to lift carpet

If you do that, the game will recognize any of the above commands that the player types in. Make sure you separate each command with a semi-colon (not a comma). Also, in the 'name' box, you might want to title it something simple like 'lift carpet cmd'. It's kind of messy if you don't name it.

Then you can copy-paste the script boxes under 'use other objects on this' under the use tab for the carpet object.

Again, please ask if you have any questions!

The Pixie
tyconger192 wrote:I want to know how I can make it so a player can pull up a carpet with a utility knife, but can have the option to pull up the carpet only after he/she/it has obtained the utility knife. Likewise I would like to know how to allow the player to be given the option to move the utility knife into a dresser only if that player is in a room with the dresser and carrying the utility knife. I also wish that there were some tutorial videos diving into everything quest has to offer, I think it is really unfair that the tutorials are minimal and it is nearly impossible for myself and probably others to get a clear understanding of the Quest program. I hope that in the future we won't have to suffer not knowing how to do certain things and that everything will be easy to understand. For the time being I take great frustration in knowing I am incapable of using all of Quest's convenient features.

This is why there are numerous "how to"guides:
http://docs.textadventures.co.uk/quest/guides/

And in particular:
http://docs.textadventures.co.uk/quest/ ... verbs.html
http://docs.textadventures.co.uk/quest/ ... verbs.html

jaynabonne
tyconger: the first thing you need to do in a case like this is work out what you want the player to type in order to accomplish what you want them to do. For example, to pull up the carper with the utility knife, what do you want them to type? "pull up carpet with knife"? "use knife on carpet"? The design choices you make determine how you implement it (and so our answers will vary).

If it's the latter ("use knife on carpet"), then the part of the tutorial relating to the defibrillator shows how to set up that verb. (http://docs.textadventures.co.uk/quest/ ... jects.html)

If you want it more like the former, then one option is to have a direct command with the pattern "pull up carpet with knife" (which might be too specific for people to know to type).

You could also create a verb with the pattern "pull up #object#" and attribute (say) "pullup". You will need to have objects named "carpet" and "knife". Then click on the "carpet" object and select its "Verbs" tab. Click the Add button and select "pull up", which will be at the bottom of the list. Click where it says "Print a message", and instead choose "Require another object". Then click the Add button and select the knife. At this point, you can create script to handle the "knife on carpet" case. You will need to make sure you have the knife, as the verb will work even if the knife is just in the room with you.

InfectedBehaviour
I'm still some what a noob with quest but I get by. The tutorials do lack in some sections but it didn't stop me from practising what the tutorials already taught me. After I completed reading and following the tutorial, I went and made another little game from what I learned from the tutorials and also played around with some of the other options. When I tested that game, I had a few bugs from the features I played around with but I eventually solved some of them. I might not know all the features that quest has to offer but first get to know some of quest before battling with you're own game.

tyconger192
XanMag wrote:I have created a short game to show you how that works. Click on code view in the GUI editor of a NEW game. Copy-paste all the code below over top of everything in the new game. Then, exit code view and you can see how I set it up using the GUI. I added a trapdoor that you can enter after pulling up the carpet. Ignore the other gibberish you see in there. I was testing some other stuff.

<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Test Characters">
<gameid>34140a79-4073-431d-8efa-ebf486f930ef</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
<attr name="autodescription_Iamin_useprefix" type="boolean">false</attr>
<pov type="object">Fred</pov>
<start type="script">
</start>
</game>
<object name="A">
<inherit name="editor_room" />
<description type="string"></description>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<enter type="script">
if (RandomChance(50)) {
MoveObjectHere (Ned)
if (ListContains(ScopeVisible(), Ned)) {
msg ("You are in Room A with Ned.")
}
else {
msg ("You are in Room A by yourself.")
}
}
</enter>
<onexit type="script">
MoveObject (Ned, Dead Room)
</onexit>
<exit alias="north" to="D">
<inherit name="northdirection" />
</exit>
<exit alias="south" to="B">
<inherit name="southdirection" />
</exit>
<object name="backpack">
<inherit name="editor_object" />
<inherit name="container_open" />
<look>It is a backpack.</look>
<alt type="stringlist">
<value>pack</value>
<value>bag</value>
</alt>
<take />
<feature_container />
<listchildren />
</object>
<object name="apple">
<inherit name="editor_object" />
<look>It's a red apple.</look>
<take />
</object>
<object name="banana">
<inherit name="editor_object" />
<look>It's a yellow banana.</look>
<take />
</object>
<object name="HKs head">
<inherit name="editor_object" />
<alias>HK's head</alias>
<look>It is the ugliest thing you have every seen. lol</look>
<take />
</object>
</object>
<object name="B">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<exit alias="south" to="C">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="A">
<inherit name="northdirection" />
</exit>
<object name="carpet">
<inherit name="editor_object" />
<look type="script">
if (GetBoolean(carpet, "peeled")) {
msg ("You have cut the carpet and pulled it off the floor revealing a trap door beneath. The remnants of the carpet lie in a heap in the corner.")
}
else {
msg ("The carpet in this room is ugly and loosely attached to the floor.")
}
</look>
<usedefaultprefix />
<feature_usegive />
<useon type="scriptdictionary">
<item key="utility knife">
msg ("You bend down and cut the loose carpet with the knife and give it a good pull. The carpet peels back and you see a trap door beneath.")
SetObjectFlagOn (carpet, "peeled")
MoveObject (trap door, B)
</item>
</useon>
<pull>You pull on the carpet, but it is stuck to the floor just tightly enough that you cannot pull it with your bare hands.</pull>
<lift>You pull on the carpet, but it is stuck to the floor just tightly enough that you cannot pull it with your bare hands.</lift>
<takemsg>You have no need to take the ugly carpet so you leave it be.</takemsg>
</object>
<exit name="trapdoorlock1" alias="down" to="basement">
<inherit name="downdirection" />
<locked />
<scenery type="boolean">false</scenery>
<visible type="boolean">false</visible>
<lockmessage>That way is blocked by a trap door</lockmessage>
</exit>
</object>
<object name="C">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<exit alias="south" to="D">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="B">
<inherit name="northdirection" />
</exit>
<object name="utility knife">
<inherit name="editor_object" />
<look>It is a standard box-cutter utility knife.</look>
<take />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>a</prefix>
</object>
</object>
<object name="D">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<exit alias="south" to="A">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="C">
<inherit name="northdirection" />
</exit>
<object name="Fred">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="namedmale" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<attr name="pov_alias">me</attr>
<attr name="pov_gender">I</attr>
<attr name="pov_article">myself</attr>
<visible type="boolean">false</visible>
<gender>me</gender>
<article>mine</article>
<alias>I</alias>
</object>
<object name="dresser">
<inherit name="editor_object" />
<inherit name="container_open" />
<feature_container />
<isopen type="boolean">false</isopen>
<openmsg>You open the dresser.</openmsg>
<closemsg>You close the dresser.</closemsg>
<hidechildren />
<listchildren />
<look>It is a dresser.</look>
<scenery type="boolean">false</scenery>
</object>
</object>
<command name="be dread">
<pattern>be dread</pattern>
<script>
if (ListContains(ScopeVisible(), Dread)) {
ChangePOV (Dread)
}
</script>
</command>
<command name="be ned">
<pattern>be ned</pattern>
<script>
if (ListContains(ScopeVisible(), Ned)) {
ChangePOV (Ned)
}
else {
msg ("Ned ain't here.")
}
</script>
</command>
<command name="be fred">
<pattern>be fred</pattern>
<script>
if (ListContains(ScopeVisible(), Fred)) {
ChangePOV (Fred)
}
</script>
</command>
<object name="Dead Room">
<inherit name="editor_room" />
<object name="Dread">
<inherit name="editor_object" />
<inherit name="namedmale" />
<inherit name="editor_player" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<look>It's Dread.</look>
<feature_player />
</object>
<object name="Ned">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="namedmale" />
<inherit name="switchable" />
<feature_player />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<attr name="feature_switchable" type="boolean">false</attr>
<switchonmsg>You have turned Ned on. Creep.</switchonmsg>
<switchoffmsg>Ned is turned off by your efforts. Weird.</switchoffmsg>
<take />
<takemsg>You grunt with all your might and pick Ned up, but immediately put him back down.</takemsg>
<ontake type="script">
MoveObjectHere (Ned)
</ontake>
</object>
<object name="trap door">
<inherit name="editor_object" />
<inherit name="openable" />
<look>It is a trap door and it is centered in the middle of the now exposed floor.</look>
<feature_container />
<openscript type="script">
msg ("You pull open the trap door and darkness is revealed below.")
HelperOpenObject (trap door)
UnlockExit (trapdoorlock1)
MakeExitVisible (trapdoorlock1)
</openscript>
</object>
</object>
<verb>
<property>lift</property>
<pattern>lift</pattern>
<defaultexpression>"You can't lift " + object.article + "."</defaultexpression>
</verb>
<object name="basement">
<inherit name="editor_room" />
<description>It's dark in here.</description>
<exit alias="up" to="B">
<inherit name="updirection" />
</exit>
</object>
</asl>


Let me know if you have questions!

XanMag


I had meant that I wanted the drop down list of verbs for carpet to display pull or lift, etc., only after the player obtained the utility knife, I want all verbs to be accessible through the drop down list of verbs that come with each object. I already know how to use a ridiculously complicated method, so essentially I want to do this in a simpler way than the way I am doing and I want to make sure the pull up verb doesn't appear from the drop down list until after the player has obtained a utility knife, you'll notice that you have to 1) move the bed then 2) walk around after the bed is moved in order for the pull up carpet verb to appear, similarly I want the player to also have to have the utility knife for the pull up carpet verb to be visible but it feels like I am over complicating things, here is my code, if you want to help further paste it in and view what I have created so far:

<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Dark Pages">
<inherit name="theme_typewriter" />
<gameid>42122afa-48de-4402-a879-19a00d6fe01d</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
<gridmap />
<feature_pictureframe />
<feature_limitinventory />
<showhealth />
<feature_lightdark />
<feature_asktell />
<appendobjectdescription />
<multiplecommands type="boolean">false</multiplecommands>
<defaultwebfont>Special Elite</defaultwebfont>
<subtitle>object.attribute </subtitle>
<defaultbackground>Black</defaultbackground>
<defaultforeground>Red</defaultforeground>
<showpanes />
<customwidth type="int">1200</customwidth>
<defaultlinkforeground>Tomato</defaultlinkforeground>
<author>{object:bed}</author>
<defaultfontsize type="int">12</defaultfontsize>
<start type="script"><![CDATA[
msg ("The Ruben family nearly finished packing their belongings to head to a new house, a change of scenery. Although this house was new to the Rubens it had been around for as long as its community could remember. “Everybody pack up your stuff, we are going to be moving today. Fill up those boxes with everything you want, we aren’t coming back!” Said Eve, a mother of the household.<br/><br/>The Ruben family is not small in size, Eve and her wife Melony decided they wanted a big family, so they adopted half a dozen children. Of these children there is Walter, the curious one, who is both amused by and obsessed with horror. Walter continues to collect movies and books of the horror genre and has roughly two hundred twenty different horror themed movies and books. Walter is an eighteen year old and he is jobless. Of the other five there is Oscar, the most energetic of the bunch. Oscar is a sixteen year old who has a whole shelf full of trophies and as a result has an inflated ego. <br/><br/>Sophia a fourteen year old freshman in high school is the smart one, she can answer almost any question, she is omniscient it would seem. Sophia is in fact more intelligent than all of the Rubens put together. School is a breeze for her. Then there is Nevil who like Walter, is eighteen. Nevil is a bit of a wild card. He is evil and crazy in his true essence, but that hardly ever shows. Nevil will do very unordinary things because he doesn’t think of the impact they have on other people. For example he might hurt someone without thinking of the feelings that they might get from him hurting them. <br/><br/>Most of Nevil’s thoughts make sense to him, but are in reality really illogical. Nevil is also a very dark person. There are times when it is as if Nevil is possessed by the devil because he can be so dark. And who could forget, the family’s beloved Addison. Addison cooks meals each day for the family and she is very talented at it. She wants to be a chef when she grows up and is fifteen years old. The final person in the family is Jacob. Jacob is a very religious child, he often tries to convert everyone he knows into believers of God. Jacob is the only one of the family that hates his parents for their sexual orientation. On the other hand Nevil just hates his family in general.<br/><br/>Walter placed his DVDs, comic books and what not into the remaining cardboard box. Jacob gathered his bibles and religious artifacts to place in his box. Sophia gathers her books that she loves dearly. Oscar places a basketball, the last of his belongings, into his box. Addison brings her cooking supplies to her box and finally for protection for paranoid Nevil, he places a pocket knife in his front right jeans pocket.<br/><br/>Now you're at your new home as Walter, it is night five and the house has made a lot of weird noises since you have arrived. For some odd reason the basement door is boarded up. You should investigate the history of the home and ask your parents about the sealed off basement.<br/>")
]]></start>
</game>
<object name="room">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>the Ruben house (</prefix>
<alias>your bedroom</alias>
<suffix>)</suffix>
<dark type="boolean">false</dark>
<objectslistprefix type="string"></objectslistprefix>
<attr name="grid_fill">OrangeRed</attr>
<attr name="grid_border">Red</attr>
<attr name="grid_length" type="int">1</attr>
<description type="script">
</description>
<enter type="script">
player.location = 1
</enter>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<visible />
<scenery type="boolean">false</scenery>
<location type="int">0</location>
</object>
<object name="bed">
<inherit name="editor_object" />
<visible />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<scenery type="boolean">false</scenery>
<take type="boolean">false</take>
<look>You examine the bed, it appears to be a large single bed with brown sheets covering it. The bed is squishy and a really cozy piece of furniture. </look>
<prefix>There is a soft</prefix>
<suffix>in your bedroom</suffix>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<move type="script">
if (GetBoolean(bed, "trapdoor")) {
if (GetBoolean(bed, "moved")) {
MakeExitVisible (trapdoor)
MoveObject (player, loading)
}
else if (not GetBoolean(bed, "moved")) {
MakeExitInvisible (trapdoor)
MoveObject (player, loading)
}
}
else {
if (not GetBoolean(bed, "moved")) {
SetObjectFlagOn (bed, "moved")
msg ("You move the bed to the corner of the room against the wall.")
}
else {
SetObjectFlagOff (bed, "moved")
msg ("You move the bed to the center of the room against the wall.")
}
}
</move>
</object>
<exit alias="hallway" to="room0">
<inherit name="westdirection" />
<prefix>out to the</prefix>
</exit>
<object name="floor">
<inherit name="editor_object" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>there is a carpet</prefix>
<suffix>beneath your feet</suffix>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<look>The flooring is brown carpet and matches your bedding, it feels good and you enjoy walking on it.</look>
<alt type="stringlist" />
<walkaround type="script">
if (GetBoolean(bed, "moved")) {
msg ("You hear creaking beneath your feet, perhaps some wood is underneath the carpet?")
MakeObjectInvisible (floor)
MakeObjectVisible (floor2)
MoveObject (player, loading)
}
else {
msg ("You hear soft footsteps on the carpet.")
}
</walkaround>
</object>
<object name="floor1">
<inherit name="editor_object" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>there is a stone</prefix>
<suffix>beneath your feet</suffix>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<look>The flooring is stone with carpet peeled off of it and feels really cold.</look>
<alt type="stringlist" />
<visible type="boolean">false</visible>
<alias>floor</alias>
<walkaround type="script">
if (GetBoolean(bed, "moved")) {
msg ("You hear creaking beneath your feet as you walk over the trapdoor and you hear thudding as you walk over the stone floor.")
}
else {
msg ("You hear thudding from your footsteps as you walk over the stone floor.")
}
</walkaround>
</object>
<object name="floor2">
<inherit name="editor_object" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>there is a carpet</prefix>
<suffix>beneath your feet</suffix>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<look>The flooring is brown carpet and matches your bedding, it feels good and you enjoy walking on it.</look>
<alt type="stringlist" />
<visible type="boolean">false</visible>
<gender>it</gender>
<alias>floor</alias>
<walkaround type="script">
if (GetBoolean(bed, "moved")) {
msg ("You hear creaking beneath your feet, perhaps some wood is underneath the carpet?")
}
else {
msg ("You hear your soft footsteps on the carpet.")
}
</walkaround>
<pullup type="script">
if (Got(utility knife)) {
msg ("You move the furniture and stuff that your bedroom contains out to the hallway. You cut and pull up the carpet to reveal stone floor. You return the furniture and other items back to their original spots from the hallway into your bedroom. You discover a trapdoor underneath the carpet.")
MakeObjectInvisible (floor2)
MakeObjectVisible (floor1)
MakeExitVisible (trapdoor)
SetObjectFlagOn (bed, "trapdoor")
MoveObject (player, loading)
}
else {
msg ("You haven't got the proper tool to cut and remove the carpet.")
}
</pullup>
</object>
<exit name="trapdoor" to="room1">
<prefix>you can enter an old</prefix>
<suffix>leading to the basement in your bedroom</suffix>
<visible type="boolean">false</visible>
<scenery />
</exit>
<object name="dresser">
<inherit name="editor_object" />
<inherit name="container_limited" />
<feature_container />
<maxobjects type="int">20</maxobjects>
<isopen type="boolean">false</isopen>
<listchildren />
<drop type="boolean">false</drop>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Open</value>
<value>Close</value>
</displayverbs>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>a green wooden</prefix>
<hidechildren type="boolean">false</hidechildren>
<contentsprefix type="string"></contentsprefix>
<listchildrenprefix>Inside you find that </listchildrenprefix>
<feature_usegive />
<givesingle type="boolean">false</givesingle>
<object name="utility knife">
<inherit name="editor_object" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>there is a</prefix>
<take />
<feature_usegive />
<drop type="boolean">false</drop>
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<useindividualverblist type="boolean">false</useindividualverblist>
<usestandardverblist />
<moveutilityknifetodresser type="script">
if (Got(utility knife)) {
if (ListContains(ScopeReachable(), dresser)) {
MoveObject (utility knife, dresser)
msg ("Utility knife moved to dresser")
}
}
</moveutilityknifetodresser>
</object>
</object>
</object>
<object name="room0">
<inherit name="editor_room" />
<alias>hallway</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>the Ruben house (</prefix>
<suffix>)</suffix>
<attr name="grid_length" type="int">3</attr>
<attr name="grid_fill">OrangeRed</attr>
<attr name="grid_border">Red</attr>
<enter type="script">
player.location = 2
</enter>
<exit alias="your bedroom" to="room">
<inherit name="eastdirection" />
<prefix>into</prefix>
</exit>
</object>
<verb>
<property>walkaround</property>
<pattern>walk around</pattern>
<defaultexpression>"You can't walk around " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>pullup</property>
<pattern>pull up</pattern>
<defaultexpression>"You can't pull up " + object.article + "."</defaultexpression>
<multiobjectmenu>With which object?</multiobjectmenu>
</verb>
<object name="loading">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<suffix type="string"></suffix>
<alias>Loading..</alias>
<descprefix type="string"></descprefix>
<objectslistprefix type="string"></objectslistprefix>
<enter type="script">
if (GetInt(player, "location") = 1) {
MoveObject (player, room)
}
</enter>
</object>
<object name="room1">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<alias>basement</alias>
<prefix>the Ruben house (</prefix>
<suffix>)</suffix>
</object>
</asl>


-Tyconger192

HegemonKhan
the verbs that you see are put into a built-in String List called 'displayverbs' (when you aren't carrying the Objects) and~or 'inventoryverbs' (when you are carrying the Objects), and here's Pixie's guide that helps with using them:

http://docs.textadventures.co.uk/quest/ ... verbs.html

essentially, when you want that Verb to be added to (or removed from) the 'display~inventory verb' list when (usually when~if the condition is met via the 'if' Script) you want it to be.

So you got to work with String Lists, adding and removing Values (your verbs) from the 'displayverbs' and~or 'inventoryverbs' built-in String List Attributes.

----

for a conceptual example (any code is pseudo~quasi code, it is not actual proper syntax):

'door' Object:

Verbs: unlock

'unlock' Verb:

if (player has key), then unlock door, and add to list 'displayverbs', the verb 'open', and, remove from list 'displayverbs', the verb 'unlock', and lastly, add to list 'displayverb', the verb 'lock'.

'open' Verb:

move player into the new room, and see similiar design Scripts above, for this verb

'close' Verb:

blah scripts, and see similiar design Scripts above, for this verb

'lock' Verb:

blah scripts, and see similiar design Scripts above, for this verb

----------

this is the 'if~code~checking' logic that new people need to train their brain into thinking in this way, which takes quite some time, in order to make games.

tyconger192
HegemonKhan wrote:the verbs that you see are put into a built-in String List called 'displayverbs' (when you aren't carrying the Objects) and~or 'inventoryverbs' (when you are carrying the Objects), and here's Pixie's guide that helps with using them:

http://docs.textadventures.co.uk/quest/ ... verbs.html

essentially, when you want that Verb to be added to (or removed from) the 'display~inventory verb' list when (usually when~if the condition is met via the 'if' Script) you want it to be.

So you got to work with String Lists, adding and removing Values (your verbs) from the 'displayverbs' and~or 'inventoryverbs' built-in String List Attributes.

----

for a conceptual example (any code is pseudo~quasi code, it is not actual proper syntax):

'door' Object:

Verbs: unlock

'unlock' Verb:

if (player has key), then unlock door, and add to list 'displayverbs', the verb 'open', and, remove from list 'displayverbs', the verb 'unlock', and lastly, add to list 'displayverb', the verb 'lock'.

'open' Verb:

move player into the new room, and see similiar design Scripts above, for this verb

'close' Verb:

blah scripts, and see similiar design Scripts above, for this verb

'lock' Verb:

blah scripts, and see similiar design Scripts above, for this verb

----------

this is the 'if~code~checking' logic that new people need to train their brain into thinking in this way, which takes quite some time, in order to make games.


Thank you, this is exactly the kind of help I was looking for, I now know how to do things in a much simpler way. This was very helpful and I appreciated it. Things are now resolved, I need no further help with this issue.

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

Support

Forums