playMaker

Author Topic: Screen Tap OR Hold [SOLVED]  (Read 2493 times)

escpodgames

  • Hero Member
  • *****
  • Posts: 677
    • View Profile
    • Assets
Screen Tap OR Hold [SOLVED]
« on: August 28, 2012, 02:28:04 AM »
Hi,

I'm trying to perform a screen Tap OR Hold - so the player can tap to open an onscreen menu or hold down and move their finger for player inputs. I've been playing around with it all day and can get it to tap on very rare occasions.

Here's the basics of what I'm doing -

State 01 - Touch Event - Began (send event FINISHED)

State 02 - Touch Event - End (send event Tap)
                Touch Event - Moved (send event Hold)
                Touch Event - Stationary (send event Hold)
                Touch Event - Canceled (send event TouchCanceled)

I've tried the Touch Event - End at the bottom of the stack but get the same results, a tap that is super quick and anything a normal player would consider a tap Sends to the Hold event. ???

Any help would be much appreciated.

« Last Edit: August 28, 2012, 04:45:37 AM by LampRabbit »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13432
  • Official Playmaker Support
    • View Profile
Re: Screen Tap OR Hold
« Reply #1 on: August 28, 2012, 03:47:43 AM »
Hi,

 Are you actually testing on the device itself or are you using Uniy remote system?

bye,

 Jean

escpodgames

  • Hero Member
  • *****
  • Posts: 677
    • View Profile
    • Assets
Re: Screen Tap OR Hold
« Reply #2 on: August 28, 2012, 03:57:47 AM »
Running it on device (not using Unity Remote)

I can get it to read as a tap, it's just a very quick gesture required to get it to work. I assume this is if the finger is removed while still in state 02 ... which is micro seconds.

escpodgames

  • Hero Member
  • *****
  • Posts: 677
    • View Profile
    • Assets
Re: Screen Tap OR Hold
« Reply #3 on: August 28, 2012, 04:17:21 AM »
Just tested a few other games and tap/holds in the os - There seems to always be a wait between when the finger presses the item and when it is registered as a Hold.

If I wait for 0.1 seconds and then have a Touch Event - Ended would that still register the end if it happened while it was waiting? Or is there a better way to do this?

escpodgames

  • Hero Member
  • *****
  • Posts: 677
    • View Profile
    • Assets
Re: Screen Tap OR Hold [SOLVED]
« Reply #4 on: August 28, 2012, 04:50:41 AM »
[SOLVED]

Answered it myself  ;D using the Wait Action I can delay a state with a Touch Event - Ended which will continue to evaluate , but FINISHED won't be sent before Time has expired