Help with hiding verbs?
eleisha93
12 Jun 2014, 06:50I have a little bit of trouble on how to accomplish hiding certain verbs. Such as, I want the player to be able to pick up a convex lens - then is able to use that on a number of objects. Which are a photo, painting, memo, picture, book, bookcase. I have read some of the other posts about related questions and I got a bit confuse with all the codes and scripts (as I am not a programmer) however I managed to use this code on the convex lens after taking the object tab:
if (not ListContains(Photo.displayverbs,"Look Through Convex Lens")) {
list add (Photo.displayverbs, "Look Through Convex Lens")
}
And this one on the convex lens after dropping tab:
if (ListContains(Photo.displayverbs,"Look Through Convex Lens")) {
list remove (Photo.displayverbs, "Look Through Convex Lens")
}
Which this did work, it made the verb "Look Through Convex Lens" pop up after taking the convex lens. However when click this verb on the Photo, it says "you cant look through the convex lens it". I haven't added any code onto the Photo, Im guessing I probably need to? However im not sure what I am meant to be adding. Also how would I go about adding multiple items to this code? Or if I need to use a different code, how would I go about doing this.
Any help would be appreciated.
if (not ListContains(Photo.displayverbs,"Look Through Convex Lens")) {
list add (Photo.displayverbs, "Look Through Convex Lens")
}
And this one on the convex lens after dropping tab:
if (ListContains(Photo.displayverbs,"Look Through Convex Lens")) {
list remove (Photo.displayverbs, "Look Through Convex Lens")
}
Which this did work, it made the verb "Look Through Convex Lens" pop up after taking the convex lens. However when click this verb on the Photo, it says "you cant look through the convex lens it". I haven't added any code onto the Photo, Im guessing I probably need to? However im not sure what I am meant to be adding. Also how would I go about adding multiple items to this code? Or if I need to use a different code, how would I go about doing this.
Any help would be appreciated.

Pertex
12 Jun 2014, 10:01Just try this:
if (not ListContains(Photo.displayverbs,"Look Through")) {
list add (Photo.displayverbs, "Look Through")
}
eleisha93
12 Jun 2014, 10:13That didn't seem to work. I added it to the photo, was that where I was supposed to be adding it to?

Pertex
12 Jun 2014, 13:50Perhaps you could attach your game file here? It's hard to solve a problem without seeing it
eleisha93
12 Jun 2014, 22:22Hi I have uploaded the file. The Convex Lens and photo are in the Secretary Room is the 2nd draw via the small desk

Pertex
14 Jun 2014, 15:26Ok, here is your game file. I moved the player to the secretary room for testing. Then I changed the verb a little bit, added the verb "look through convex lens at" to the verbs tab of Photo and enabled the checkbox "disable automatically generated display verb for the object" in the Object tab of Photo. There it is!