Playmaker Forum

PlayMaker Help & Tips => PlayMaker Tips & Tricks => Topic started by: acornbringer on June 24, 2016, 03:32:58 PM

Title: Simple Double Click[SOLVED]
Post by: acornbringer on June 24, 2016, 03:32:58 PM
Hey!

I came up with this really simple double click setup for a game I'm working on after failing to understand the instructions given in a help post :p

Topic: [SOLVED] Mouse Double Click - how to?
http://hutonggames.com/playmakerforum/index.php?topic=1721.0

It's been working out great for me so maybe it will suit your purposes as well if jeanfabre's resolution doesn't.

In my case, I needed to let the player click to and drag the screen to scroll through content as well as click the same screen to roll a die. In order to keep the two functions from clashing, I needed a double click so there was a distinction.

When the player clicks the scene, they trigger a box collider FSM I put back there. If they don't click again before the "Check for Double Click" state is done waiting, it returns to the "Waiting" state. A "Wait" action set to 0.2 seems to work for my double click but making it a larger number will allow for slower double clickers. If the player clicks within the time frame, it follows through with the dice roll.

Hope this helps someone out!
Title: Re: Simple Double Click
Post by: Helen61 on August 03, 2016, 07:51:46 PM
Oh, I was wondering about it for a long time. Thanks for solution mate!
Title: Re: Simple Double Click
Post by: ElizabethAnderson55 on August 09, 2016, 05:24:51 AM
I really like this as well. Works for me perfectly ;)
Title: Re: Simple Double Click
Post by: Emma1988 on August 11, 2016, 09:37:07 AM
You made my day! Thanks!!
Title: Re: Simple Double Click[SOLVED]
Post by: Gerwald on August 23, 2019, 10:30:28 AM
Yes you really made my day to!  ;D
Title: Re: Simple Double Click[SOLVED]
Post by: jeanfabre on February 17, 2020, 01:59:32 AM
Hi,

 yes, my solution was more complicated than this, that was the early days for me :) indeed I am doing it like you do now !

Bye,

 Jean