Doubleclick on open doors instantly[solved]

Started by zeta_san, Mon 03/08/2020 18:22:22

Previous topic - Next topic

zeta_san

Hi everyone
I am Italian, I hope to write correctly.
I am using the Tumbleweed theme, I have modified and added.
Now it's how I like it but I don't like that you can enter the room without reaching the door.

Code: ags

  // Doubleclick on open doors changes room instantly
  Verbs.VerbGuiOptions[eVerbGuiExitDoorDoubleclick] = true;


Even changing this value I don't solve
thanks

Khris

Unfortunately, the template in the first room's script doesn't contain the wrapper to make the player character reach the clicked area first.

What you're supposed to do is
Code: ags
function oDoor_AnyClick() {

  // walk to door first
  if (Verbs.MovePlayer(170, 134)) {

    // verb blocks in here
    if(Verbs.UsedAction(eGA_Use)) {
      // ...
    }

  }
}


This way the player will walk to the stated coordinates without blocking the game, and the commands for the verb will only run if they actually reach the door.

zeta_san

thank you, I thought about it immediately after posting. I always use that solution for objects and hotspots

thanks

SMF spam blocked by CleanTalk