Hmm another day another problem. Sorry for the many posts over the last few days but I am very new to scripting and spend hours looking at code/documentation before posting.
anyway, I have this in my room script
function oWatch_Interact()
{
cMainChar.Walk(467, 460, eBlock, eWalkableAreas);
cMainChar.Say ("picked it up");
oWatch.Visible = false;
cMainChar.AddInventory (iWatch, 3);
}
function oWatch_Look()
{
cMainChar.Walk(467, 460, eBlock, eWalkableAreas);
cMainChar.Say ("aah a watch");
}
when I click on the item and choose look (using a verbcoin) It runs both parts of this code. Always starting with the - function 0Watch_Look() no matter which
verbcoin button I click (look or interact)
so it says "aah a watch" then straight away "picked it up" then picks it up. Regardless of which button is pressed on the verbcoin
I am using the verbcoin template
thanks in advance
It has to do with the verbcoin template, cause the code is fine.
the verb coin template included with AGS is a little iffy.. I had to heavily modify it to get it to work with mccarthy.
I think someone released a better one though (might have been abstauber, i cant remember)
Also do you really *need* a verb coin?
think about it: A verb coin includes use, look and talk.
if you mapped use to the left click and look to the right click then you are only missing talk which is only used for people and you can just use the left click for that.. since you never really need to *use* people.
just food for thought
yeah, I have actually got rid of the talk on the verbcoin anyway. I just kind of like the interface that way as it is similar to the interface I have been playing
on iphone with the releases of BASS and Broken Sword.
I have basically got it working very well apart from this little problem has appeared recently. I must have messed something up in the code somewhere and just cant find it as the problem does not happen on a clean version of the verbcoin template. If I cant find it soon I think I may just start again on a fresh copy.
well if you only have 2 interactions (use and look) surely the verb coin is just an irritation for the player?
It serves no purpose except to delay and add a mouse click, surely?
I am creating it with future compatability in mind. My main goal is to make a game that at some-point, somehow I can port to a touchscreen interface where a simple verbcoin interface is preferable. I see your point about the simplicity of the right/left click for pc releases but I m using this as a building/test ground for a game that I forsee being played on a device with no left/right click option.
I had a look through the forums and could not find the verbcoin version you mentioned, however I have restarted my template and seems to work fine for now.