Is the verbcoin template broken?

Started by arvejeitor, Fri 13/05/2016 12:59:40

Previous topic - Next topic

arvejeitor

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.

Khris

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
Code: ags
      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:
Code: ags
      while (Mouse.IsButtonDown(getMouseButtonLeft(false))) Wait(1);
This will hide the mouse though, while you hold down the button.

arvejeitor

Thanks! I tried your fix and it works! :D

SMF spam blocked by CleanTalk