Wear and opposite command?

Mareus
So, I made an outfit you can put on in the game by using the default "wear" verb that comes with Quest. I am wondering if there is any way to do the opposite - to undress yourself without having to create a new verb. The reason why I am avoiding making new verbs is because I noticed that I get an "Error running script: No verb response defined" when playing the game and typing in this newly created verb + already existing object that does not have the newly created verb added in its verbs menu. This is a problem I encountered by accident when due to my lack of knowledge I created a new verb called "open" for opening containers. The error appeared when I tried doing something nonsensical like typing: open wall. Since then I have learned I did not need to create a new verb for opening stuff, but I also do not want to have errors popping out if players feel the need to try nonsensical stuff with other newly created verbs.

The only way I found to avoid this error is very time consuming. Basically for each new verb I create I have to add at least a few lines to every other object I created for that particular verb. Another alternative is to skip using newly created verbs all together and use commands instead, but I am not entirely satisfied with that solution either.

Any other advice what to do?

HegemonKhan
you need a conditional check, when you got a conditional (object that has the verb vs object that doesn't have the verb), example:

<function name="your_verbs_scripting_function" parameters="object_x">
if (HasScript (object_x, "your_verbs_name") {
// do your wear scripting
} else {
msg ("This action is not possible with this object.")
}
</function>


------

you can save scripting redundency by using a function to hold your scripting, then you simply 'call upon' (add a script) within your Verb, Command, or whatever other Element.

------

you can add Chase's Wearables Library to your game, as otherwise, if quest doesn't have it's own built in 'unwear~remove' Verb, you'd have to make your own, obviously.

jaynabonne
You get that message if you have not provided a default response for your verb. If you provide a default response (e.g. "You can't wear that."), then it will show that. If not, then it has no idea what to do and prints out "No verb response defined".

For example, if I create a verb called "foobie" with attribute "foobie" and pattern "foobie #object#" with no default response, and if I have a "banana" object with no "foobie" defined, then if I get this:

> foobie banana
Error running script: No verb response defined

If I set the default text response in the verb to "You can't foobie that", then I get:

> foobie banana
You can't foobie that

Mareus
jaynabonne wrote:You get that message if you have not provided a default response for your verb. If you provide a default response (e.g. "You can't wear that."), then it will show that. If not, then it has no idea what to do and prints out "No verb response defined".

For example, if I create a verb called "foobie" with attribute "foobie" and pattern "foobie #object#" with no default response, and if I have a "banana" object with no "foobie" defined, then if I get this:

> foobie banana
Error running script: No verb response defined

If I set the default text response in the verb to "You can't foobie that", then I get:

> foobie banana
You can't foobie that


Thanks a lot for explaining that. I couldn't make sense out of it before.

HegemonKhan
thanks for helping Jay! (I really need to get familiar with the built-in stuff, as I'm just re-creating the wheel as I'm not recognizing the issue at hand... and thus not being of help to people. I created a default response scripting, when it already exists, argh, and thus mareus just needed to set a response for the built-in default response, sighs)

Mareus
HegemonKhan wrote:thanks for helping Jay! (I really need to get familiar with the built-in stuff, as I'm just re-creating the wheel as I'm not recognizing the issue at hand... and thus not being of help to people. I created a default response scripting, when it already exists, argh, and thus mareus just needed to set a response for the built-in default response, sighs)

Well, you did help me a couple of times and I am grateful for any help I can get. But Jay is the ultimate master :) He really knows his stuff.

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

Support

Forums