Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / doubleclick

Author
Message
the destroyer
15
Years of Service
User Offline
Joined: 24th Dec 2008
Location:
Posted: 12th Jun 2009 19:58
Hi, can someone show me how to check for double click,
for example if i press upkey for the first time the player will walk
but if i press it two times in 3 sec then the player will run
thx
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 12th Jun 2009 21:19


Hope this gives u a prod in the right direction.

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 12th Jun 2009 22:11 Edited at: 13th Jun 2009 00:10
Here you go:



i like orange
the destroyer
15
Years of Service
User Offline
Joined: 24th Dec 2008
Location:
Posted: 12th Jun 2009 22:41
but nothing happens, it's the same speed
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 13th Jun 2009 00:09
You're probably not pressing it fast enough. That example is set to 300 milliseconds. Try this one, which is set to 3 seconds instead:



Although I'm not sure why you would want it to be so long.

i like orange
the destroyer
15
Years of Service
User Offline
Joined: 24th Dec 2008
Location:
Posted: 13th Jun 2009 11:36 Edited at: 13th Jun 2009 12:22
thanx for the example andrewT, I want that when i press the upkey the player will move slowly but if I press the upkey twice in 3 sec then the player will move fastly
hope u understand


Edit:
thank you very much now it works and thats what i want
my last problem is that when i press the spacekey the player wont jump and the animation is playing just when i'am pressing the spacekey

here is the code
change the media with some objects

the terrain i'am using can be found in the examples folder



thanx for help

Login to post a reply

Server time is: 2024-11-24 06:10:46
Your offset time is: 2024-11-24 06:10:46