Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Janik on Thu 02/09/2004 01:26:36

Title: Click to walk, Double-click to run?
Post by: Janik on Thu 02/09/2004 01:26:36
Hi,

I'm fairly new to AGS (did the whole tutorial and searched the manual though), but I do know how to program.

My question is, has anyone implemented a "click once to walk, double-click to run" feature in an AGS game, and can I see the script used? The Longest Journey and Syberia have this feature, and I really like it. I think every adventure game should have it!

Thanks,

Janik
Title: Re: Click to walk, Double-click to run?
Post by: Dusk on Thu 02/09/2004 01:58:31
Quote from: Janik on Thu 02/09/2004 01:26:36

My question is, has anyone implemented a "click once to walk, double-click to run" feature in an AGS game, and can I see the script used?


This topic should put you on the right way: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=12190.0

bye
D.
Title: Re: Click to walk, Double-click to run?
Post by: Janik on Thu 02/09/2004 02:49:21
Hey, thanks, that look like it would work.

I used this:
http://www.digitalmindstudio.ch/script.php?id=8&lang=en

But I didn't like the delay (waiting for a double click) when you clicked the eye/hand/whatever. What I changed was that there is now only double-clicking detection when the walking icon is selected. Seems to work pretty well so far!
Title: Re: Click to walk, Double-click to run?
Post by: kadok on Fri 10/09/2004 19:17:40
i,ve read this topic and I must ask

will I be able to make somethink like that:

>one click walk double click run
>double click on object a ladder for exaple and
  atomatically character walk up on 



Title: Re: Click to walk, Double-click to run?
Post by: Goot on Sat 11/09/2004 04:14:37
Yes. Use a timer and IsButtonPressed (mouse button) to see if they click twice within a certain amount of time.
Title: Re: Click to walk, Double-click to run?
Post by: Janik on Sat 11/09/2004 04:31:39
Indeed. In the example code given here:

http://www.digitalmindstudio.ch/script.php?id=9&lang=en

...when a click event is recorded, a dblClick variable is either 0 or 1. So your script can record double-clicks for any clicking even, be it eyes, hand or walk.