Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Mel_O_Die on Sat 26/08/2006 13:41:31

Title: (SOLVED) Rapid changeroom on double click
Post by: Mel_O_Die on Sat 26/08/2006 13:41:31
Hi! I made some research on this forum but i can't found anything about my little problem

i just want to skip the walking sequence on double click (or re-click) on the exit area and directly go to the next room

i have try with a "while" loop but it doesn't work

how can i made that easy?

thanks :)
Title: Re: Rapid changeroom on double click
Post by: monkey0506 on Sat 26/08/2006 15:03:13
You could try something like this:

// global script
bool dblClick = false;
int dblClickTimer = 0;

// on_mouse_click
dblClick = ((dblClickTimer) && (!dblClick));
dblClickTimer = GetGameSpeed() / 4;
if (button == eMouseLeft) {
  if (dblClick) {
    // go to new room
    }
  }

// repeatedly_execute
if (dblClickTimer) dblClickTimer--;


Hopefully this will help you figure something out.
Title: Re: Rapid changeroom on double click
Post by: SSH on Sat 26/08/2006 15:47:47
It's easier than that, you just put a WaitUntilMouseKey and then check if the left button was pressed, then if it is you do the change room.

I did a thing in Awakening of the Sphinx where a double-click made the character walk speed go faster, I'll try and look out the code, if I still have it
Title: Re: Rapid changeroom on double click
Post by: Mel_O_Die on Sat 26/08/2006 17:24:23
thanks for your answers but i try these two methods and i think that i made wrong things and it doesn't work  :'(
Title: Re: Rapid changeroom on double click
Post by: Joe on Sun 27/08/2006 11:31:06
Well you could try this:


StartCutscene(eSkipMouseClick);
 
  //Your walking character code here

EndCutscene();


It will make the part of the script which is between StartCutscene and EndCutscene can be skiped with a mouse click.

Hope I helped
Title: Re: Rapid changeroom on double click
Post by: Mel_O_Die on Sun 27/08/2006 15:25:04
yeah! thanks for that (the cutscenes) it works perfectly  :o :D

my problem was caused by a set walk-to-point don't skippable by the cutscene, i removed it and put my cego.walk in the start/end cutscene

great! thanks very much again