Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: arvejeitor on Fri 13/05/2016 12:59:40

Title: Is the verbcoin template broken?
Post by: arvejeitor on Fri 13/05/2016 12:59:40
Hi, I started to make a new game using the VerbCoin Template.
I created a new room, set a walkable area and put the main character on it...
But when I run the game, it doesn't walk wherever I clic.

Am i missing something or is the template broken? If I do the same thing with other templates it works fine.
Title: Re: Is the verbcoin template broken?
Post by: Khris on Fri 13/05/2016 13:32:25
It took me some time to find the error, but you are completely correct; the code is indeed broken.
The problem is that the click is processed in repeatedly_execute, and the click handling is surrounded by
      if (Mouse.IsButtonDown(getMouseButtonLeft(false)) == 0) which means you have to click for 1/100th of a second to actually trigger walking. Any longer than that, and the mouse button is still down, which skips the ProcessClick command.

I have no idea how this made it through testing; I guess it means nobody actually uses the template.
A quick fix is to open the Scumm VerbCoin GUI script, go to line 1199 and change it to:      while (Mouse.IsButtonDown(getMouseButtonLeft(false))) Wait(1);This will hide the mouse though, while you hold down the button.
Title: Re: Is the verbcoin template broken?
Post by: arvejeitor on Fri 13/05/2016 13:44:06
Thanks! I tried your fix and it works! :D