Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Double-tapping keys.... #5182
07/05/01 00:22
07/05/01 00:22
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline OP
Expert
Keith B [Ambit]  Offline OP
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Okay, sorry for the many posts of questions, this'll be the last one for a while, I swear:

Does anybody know how you can use double key-taps? I want to have my character so that if you press the up key he walks, but if double-tap it and hold on the second tap he runs...

I've tried using a timer and a flag, but that didn't work...

Any suggestions would be (as ever) much appreciated.

Thanks,
Keith


Re: Double-tapping keys.... #5183
07/06/01 20:35
07/06/01 20:35
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline OP
Expert
Keith B [Ambit]  Offline OP
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Any ideas? I'm still stuck on this one...

Cheers,
Keith


Re: Double-tapping keys.... #5184
07/07/01 02:21
07/07/01 02:21
Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
W
WildCat Offline
Expert
WildCat  Offline
Expert
W

Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
Ambit,
I'll take a wild, untested shot at it.

code:
  

var dbltap = 0;

on_k = doubletap;

function doubletap
{
if (dbltap > 0){return;}
while (dbltap < 2) // 2 is the max time before the second tap
{dbltap += time;
if (key_k > 0)
{dbl_tap = 10; // any number > 2, to get us out of the loop
do_the_function();}
wait(1);}

dbltap = 0;
}


function do_the_function
{
beep;
}


-WildCat



Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!
Re: Double-tapping keys.... #5185
07/07/01 09:42
07/07/01 09:42
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline OP
Expert
Keith B [Ambit]  Offline OP
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Thanks for the reply, Wildcat, I'll try it out first thing in the morning...
Cheers,
Keith


Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1