Troubleshooting for a beginner

Spyness
Here's the problem:
No matter what verb I type into my text adventure game, the response is "I can't see that."
Whether it's trying to pick up a key, or examine the ground, the game gives the same response. I don't know what to do so please help!

The Pixie
I would guess you have an object with a weird name or alias. If you have more than one room, go to another room, and see if the same thing happens there (or create a new room and go there). If not, then it is probably an object in that first room.

If it still happens, not so sure. Have you created any new function or command that might have the same name as an existing one? Or a command with a no pattern set? Might be worth listing any command patterns you are using.

After that, you could attach your game to a post so we could look at it if you are working offline.

Spyness
I am working on the Web version.

Watcher55
You mean for example you have defined an object "ground" in the room you're in, it is visible, and if you type "examine ground" it doesn't work? Note that verbs only work on objects you can actually "see".

I note that I've had problems with using "the" or "a" in sentences, which I think is supposed to work but doesn't necessarily.

Father thyme
Ive found that commands entered on the tree ignore 'the'and 'a'. Verbs added to an object cause a problem. Eat the apple. I can't see that ( the apple).

Father thyme
Sorry I wrote that last comment in reverse it should read commands don't ignore 'the' and 'a' . Object verbs do. Doh!

Spyness
Second problem, how do I add verbs like "smell, taste," and "listen" to my game?
I just want to the player to get descriptive text responses. Thanks.

XanMag
Go to the 'verbs' tab for whatever object you think the player might try to smell. Click it.

On this page, you will see an +Add button near the top. Click it.

A box will pop-up and you need to type in that box 'smell' (or at least part of the word) at which point you should see an already built-in 'smell; sniff' clickable section pop-up. Click that. Or just go ahead and type --> smell; sniff and click 'OK'.

This will add that verb to this object. You can then double click the smell; sniff that was added to the box at the top and add whatever script you want to add when the player tries to sniff or smell the object in question. Just select a print message script and print whatever message is appropriate. Note: if you do not add smell; sniff as a verb, you will get the built in response 'You sniff, but don't smell much' (or something like that). If you tried to type in 'pummel spoiled milk' (or some other verb that is not built-in) you would get 'I don't understand your command' response (which is built-in as a response to unrecognized verbs).

Screenshot 2016-04-13 22.18.58.png


All of those verbs you mentioned are built-in already (and thus recognized) and have a built-in response. This method above is what I would suggest to override the built-in responses. There is an alternate method for universally changing built-in verb responses, but going that route could lead to problems if you happen to mess up!

Good luck! Ask if you need questions!

Spyness
Well what I mean is, in Zork, for example, the player can type the verb "smell", with no object attached, and the game will usually respond "You smell nothing unexpected." How do I program something like that into my text game? Thanks.

The Pixie
Create a new command, and put in smell as the command pattern.

HegemonKhan
Verbs are specific-for/tied-to/attached-to that Object: the Verb-action will be a button and/or a hyperlink for the person playing to click on)

Commands are universal (NOT specific-tied to specific objects), thus you need to provide the scripts for what it does/handles, also: the Command-action uses typed-in input from the person playing the game, and acts upon that input (you need to script-syntax its 'pattern' correctly, for it to be able to work correctly and as you want it to).

-----

making custom Verb-Commands is a bit difficult to do correctly, if you're new to quest and/or especially to coding. Commands as can be seen are a bit more difficult, due to all the extra scripting you got to do. The easiest is to just use (simple) Verbs, but they're the most cumbersome (you'll have lots, too many, Verbs... Whereas Commands, you wouldn't have such a clutter/encumbrance of tons of Verbs)

The Pixie
If you are working offline, the way to do a smell command is this:

Create a new command. In the first box type smell, and in the second smellcmd. In the third, click on the ninth icon, code view, and paste this in:
if (HasString(player.parent, "smell")) {
msg(player.parent.smell)
}
else {
msg("You smell nothing much here.")
}

Any room with a smell, go to the attributes tab, create a new attribute called smell, and type the appropriate text in.

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

Support

Forums