How can i put double click in Mouse button down?

Talk about making games.

How can i put double click in Mouse button down?

Postby Sondise » Wed Dec 19, 2007 9:45 pm

How can i put double click in Mouse button down?
User avatar
Sondise
 
Posts: 94
Joined: Thu Nov 01, 2007 11:04 pm
Location: South america
Score: 0 Give a positive score

Re: How can i put double click in Mouse button down?

Postby Troodon » Thu Dec 20, 2007 4:51 am

Well you can make one variable clicknum and when you press the mouse button

clicknum += 1;
if (clicknum > 2)
{
clicknum = 0;
}

And perhaps you want to control the max time limit with a variable which effect is:

clicknum = 0;
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: How can i put double click in Mouse button down?

Postby Sondise » Thu Dec 20, 2007 1:21 pm

And then I put what I want to do?
User avatar
Sondise
 
Posts: 94
Joined: Thu Nov 01, 2007 11:04 pm
Location: South america
Score: 0 Give a positive score

Re: How can i put double click in Mouse button down?

Postby Troodon » Thu Dec 20, 2007 1:47 pm

Then you check in mouse button down:

if(clicknum == 2) //(simulated double-click)
{
//put here what you want to happen;
}
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: How can i put double click in Mouse button down?

Postby Sondise » Thu Dec 20, 2007 4:05 pm

Thanks, with these codes, i got to put a little secret in my game 8) .
User avatar
Sondise
 
Posts: 94
Joined: Thu Nov 01, 2007 11:04 pm
Location: South america
Score: 0 Give a positive score

Re: How can i put double click in Mouse button down?

Postby Troodon » Thu Dec 20, 2007 5:39 pm

Cool. :D
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron