double tap

For questions about using Classic.

Post » Sun Feb 22, 2009 4:28 pm

i'm trying to make double tapping work (pressing a key twice quickly) for dashing... i see some people posted an example of how to do it but the files are gone.
i'm controlling 8-directional movement for changing the speed and that works fine, i just can't get it to trigger when i want it to. i messed around with private variables and every-x-milliseconds but that hasn't gotten me far...
B
1
G
3
Posts: 5
Reputation: 835

Post » Sun Feb 22, 2009 6:21 pm

I think i figured it out... at least it seems to work.

goes basically like this:

on control pressed ---> set private variable "dash" to 1

every 500 milliseconds
value dash equal to 1 ---> set dash to 0

on control pressed
value dash equal to 1 ---> mess with speed etc.

does anyone know if there's a better way?
B
1
G
3
Posts: 5
Reputation: 835

Post » Sun Feb 22, 2009 6:23 pm

That looks like a good way to do it.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sun Feb 22, 2009 6:31 pm

Here's an example of one way to do it:

http://willhostforfood.com/files4/2336793/doubletap.cap

Bleah, you've got replies now but I made this example so I'm going to post it, dammit :P
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Feb 22, 2009 8:08 pm

thanks deadeye, appreciated :)
B
1
G
3
Posts: 5
Reputation: 835


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests