Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: picklegreen on Wed 31/08/2011 11:53:31

Title: look at inventory item
Post by: picklegreen on Wed 31/08/2011 11:53:31
I noticed in mokey island you can look at items in your inventory and guybrush says things about them, I found this helpful, how can I implement this?
I tried going to the actions collum in the iventory items properties and clicked the "if look at" option and then just typed cCharacter.say("something about the item");
But it doesn't seem to have worked.
Title: Re: look at inventory item
Post by: Matti on Wed 31/08/2011 12:08:46
What didn't work? Did you properly create the function (as seen below) or did you type that line directly into the actions pane?

(http://i.imgur.com/Jfb3J.png)
Title: Re: look at inventory item
Post by: picklegreen on Wed 31/08/2011 16:27:04
Yeah I clicked that then when it took me to the script page I typed cCharacter.say("something about the item");
But when I look at the item he says nothing.
Title: Re: look at inventory item
Post by: Khris on Wed 31/08/2011 16:50:45
You're using the 9verb template, right?

Read the included pdf, everything is explained in there.
Basically, you need to add the "any click on" event, and in there, use UsedAction(eActLook) or similar.