Verb repetition

TheGlassSea
Okay, so I've been having an issue with creating custom verbs. I don't really know how to explain it without giving the exact situation, so:

I have an object that is a cat. Under the verbs tab for that object, I put in "hold; cradle; cuddle; hug". The player is able to interact with the cat correctly, yay.
The problem is when I try to use one of those verbs for a different object, e.g., a person. Having the player "cradle" or "hold" the person is just a weird way of putting it, so I just wanted to use "hug". I try to enter in new verb, and a table underneath gives me the four verbs I gave to the cat. However, I just want "hug". I've tried not clicking on it, putting in a space, whatever, but it won't let me isolate one of the verbs.
I know that they won't all show up with the hyperlink, but it's annoying me to no end.

This wouldn't be a big deal, except that this is not the only time this has happened: I have grouped other verbs together that need to be separated for a different object.
It seems like once I group verbs together, they can't be separated. Is there a way to fix this, or should I just put "hug" in as a command?

OurJud
I never use verbs, but can't you just delete the ones you don't want for each object?

TheGlassSea
See, but that's the problem. When I try to only enter one in, the rest of them come up anyway. So deleting it deletes all of them. It's like they're stuck together, and I can't isolate them (or even take away one specific verb).

XanMag
It would seem so, OJ, but I just tried it and it does not work. I even created two separate verbs - hug; hold; pet; squeeze AS WELL AS a simple hug. I have a cat and a person in the same room. When I type hug person I get the 'You can't hug; hold; pet; squeeze it.' and when I hug the cat I get the proper response.

Unless I'm missing something, the simplest (and probably temporary) solution would be to place those verbs in only you want them to be in. That works out well, unless the cat can be in the same room as something else you want to hug, hold, etc.

EDIT: Okay. I stand corrected. Unlike commands, there are no local verbs for rooms only even though it appears that it is possible. I tried to add a verb to a room, and it put the verb in two places on the tree. Under verb and under the room.

I have never tried to add a verb, put when I do there are some things on the GUI that I don't understand. It looks like the add command box, but there is an attribute box under the command box which I don't know what to do with.

If I remove the verb from the room, it remains in under the verbs in the tree. Then it works. While the verb is located in the room, I get an error message: Error running script: Error compiling expression 'TypeOf(object, this.property)': FunctionCallElement: Could find not function 'TypeOf(Element, Object)'

The Pixie
When you add a new verb, Quest does something without you noticing. It adds a new verb in the left pane too, towards the top, with the commands. You can delete the verb from the object, but the one in the left pane will still be there. Delete that one too, and you should be back to the start.

The way to do this is to set up the verb for the human first, with hug. Then do the cat, with hug. That much is obvious. Now add the other words as a new verb for the cat, but for the script, do this:
do(this, "hug")

That will make the other words do the same "hug" script.

Also, read this:
viewtopic.php?f=18&t=4953

XanMag
Got it! Never used that before and really surprised I haven't run into that by now!

@TheGlassSea,

Let us know if that solution makes sense! Thanks again, Pixie!

TheGlassSea
Thanks so much for your help!
I understand what I have to do here with the scripts, however, I can't find the verbs in the left pane. I'm using the web verb of Quest, is that why? Or am I just overlooking something really obvious?

EDIT: I just checked- it would be because I am on the web version.
Thank you all, anyway! You were so helpful, thanks! :)

XanMag
I've run into an error...

I have these verbs for cat: hug; squeeze AND (separately) pet; hold; fondle

I have these verbs for Aunt Marge: hug; squeeze

I want the pet;hold;fondle verbs to return the same response as the hug;squeeze. Obviously I don't want to pet or fondle or hold my aunt. Ewww... :lol:

So, I created two separate verb additions for each object. For the script for the pet;hold;fondle verb, I have used this code: do (this, "hug; squeeze")

But, I get the error message: Error running script: Object reference not set to an instance of an object.

Here is the related code:

<object name="verb usage">
<inherit name="editor_room" />
<alias>verb usage room</alias>
<description><![CDATA[This is a room where you encounter two conflicting verbs. Both the cat and the aunt like to be hugged. You can also 'squeeze aunt'.<br/><br/>However much you dislike cats, you probably should squeeze one though. You can 'fondle cat' (creepy, I know) or you can 'pet cat' - neither of which you would want to do to your aunt, however.<br/><br/>This seems simple, but]]></description>
<object name="cat">
<inherit name="editor_object" />
<look>It's a cat. Ugly.</look>
<snork>You do that to the cat.</snork>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<pet type="script">
do (this, "hug; squeeze")
</pet>
<hug type="script">
msg ("Yuck. Cat hugged. Bleck.")
</hug>
</object>
<object name="Aunt Marge">
<inherit name="editor_object" />
<hug>She enjoys the hug.</hug>
<look>Cuddly Aunt Marge. She loves to be hugged.</look>
<nibnib>Done deal.</nibnib>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
</object>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="namedmale" />
<attr name="pov_look">You're Magoo. A simple being trapped in a test game.</attr>
<alias>Magoo</alias>
<alt type="stringlist">
<value>magoo</value>
<value>player</value>
</alt>
<look type="script">
if (game.pov = Xanadu) {
msg ("Holy moly! That looks exactly like you! To take control of Magoo, just type 'switch to Magoo'.")
}
else {
msg ("You are a simple being trapped in a test game.")
}
</look>
</object>
</object>
<verb>
<property>hug</property>
<pattern>hug; squeeze</pattern>
<defaultexpression>"You can't hug; squeeze " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>pet</property>
<pattern>pet; hold; fondle</pattern>
<defaultexpression>"You can't pet; hold; fondle " + object.article + "."</defaultexpression>
</verb>


I'm sure it's obvious and I'll feel like a dolt for asking but... there it is.

The Pixie
The script attribute is called "hug", so you need to call that:
do(this, "hug")

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

Support

Forums