'help' command

kurto321
How do I change what the game prints when the player enters 'help'?

And while we're here, how do I remove verbs from the game i'm making? I've tried to delete 'listen' from Verbs after making it show library elements but when I test the game it still says "you can't hear much." when I enter 'listen' alone and "you listen, but it makes no sound." when I enter 'listen to [object]'. I want it to say "I don't understand your command", like when I enter a nonexisting verb.

XanMag
Underneath your tree of stuff, you'll see a tiny little button labeled "filter". Click on that, click on show library elements. Go to the very top of the tree of stuff and find the "commands" and "verbs" sections. In grey, you'll see a bunch of built-in verb responses. Find the ones you want to change, click them, click copy and you will be able to edit them. For commands, just delete this,
msg (Template("DefaultHelp"))
for example under "help" and add your own script. For verbs, make sure you change the default type from 'template' to either text or expression (whichever type of code you want to run). Should work. I just got done changing a bunch of my own! =)

You may, however, want to make a universal command for some of your verbs/commands, like the listen. You could do this for your command if you want all "listen to [object]" to have the same output. Add command. Type listen to #text# and add a print msg script like, 'You listen to that, but you hear nothing' or you can print msg 'I don't understand your command.', but that, to me personally, doesn't make sense. You could also type listen to #object# and the default for a matched object would be whatever you want to change it to, or in the event of an unmatched object, I think it will print "I can't see that." (or something like that).

HegemonKhan
first, you probably don't want to remove/delete anything (and probably don't want to mess with the built-in stuff: Filter -> Show Library Elements), until you know what you're doing well (at least know some coding basics), as you can mess up your game from working (always make sure you have a backup file always, for whatever possible reason or unforeseen reason, lol)

so, instead you can simply over-ride stuff: if you make your own, for example of using a Verb/Command, say a 'take' Verb/Command, it'll over-ride the built-in 'take' Verb/Command, using yours instead of the pre-built 'take' Verb/Command.

though do note that a lot of the built-in stuff has a lot of functionality (and is often interwoven with other functionalities too), which can be quite difficult to replicate on your own (you got to be a good programmer), so you may not even want to over-ride the built-in stuff.

note that the over-riding, doesn't do anything to the built-in stuff, it just means that quest will use your custom stuff instead of the built-in stuff.

whereas, if you edit the built-in stuff (which are global/game-wide changes), while the actual quest code is preserved/protected (due to the forced clicking on the 'copy' button), you can mess up your game from working (and it'd be a nightmare for us to be able to fix, as we don't know what you did, and you'd have a hard time trying to tell us everything that you did), but the quest program will be fine, just not your game.

within the 'game' Game Object's and individual Objects (non-room non-player Objects, Room Objects, and the 'player' Player Object) Tabs, there are many such toggle options on what to show/enable and what not to show/disable. If you don't want all of the default Verbs showing up for Objects, then you need to find the 'automatically generate the default displayverbs/inventoryverbs' option (either within the individual Objects' Tabs or the 'game' Game Object's Tabs).

However, this is a bit of advanced stuff, especially if you're new to quest and espcially coding, as this deals with working with List/Dictionary Attributes, as well as having to make your own Verbs/Commands, too.

------------

to make your own (a custom) 'help' Command:

left side's "tree of stuff" -> Commands -> add -> (see below)

Command Name: help

Command Pattern: help
// let's keep this simple for now, and not get into the arguments/parameters usage (via not using the #text/object# in the Command's 'pattern' box/Attribute)

Command Script/s:

run as script -> add new script -> output -> 'print a message' Script
// if you just want to display messages (keeping it simple), than use the 'print a message' Script as shown above. Or, you can choose whatever Script you want, if you know how to use them.

and then in-game (playing the game), you'd just type in: help, (and hit enter key), to activate your custom 'help' Command.

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

Support

Forums