(SOLVED) Rapid changeroom on double click

Started by Mel_O_Die, Sat 26/08/2006 13:41:31

Previous topic - Next topic

Mel_O_Die

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 :)
----( )----
Click to see "In Production" Topic!
[/color][/b][/url]

monkey0506

You could try something like this:

Code: ags
// 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.

SSH

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
12

Mel_O_Die

thanks for your answers but i try these two methods and i think that i made wrong things and it doesn't work  :'(
----( )----
Click to see "In Production" Topic!
[/color][/b][/url]

Joe

Well you could try this:

Code: ags

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
Copinstar © Oficial Site

Mel_O_Die

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
----( )----
Click to see "In Production" Topic!
[/color][/b][/url]

SMF spam blocked by CleanTalk