Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Akow), 1,403 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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 | chip programmers | 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