Playmaker Forum

PlayMaker Help & Tips => iOS Help => Topic started by: escpodgames on August 28, 2012, 05:28:04 AM

Title: Screen Tap OR Hold [SOLVED]
Post by: escpodgames on August 28, 2012, 05: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.

Title: Re: Screen Tap OR Hold
Post by: jeanfabre on August 28, 2012, 06:47:43 AM
Hi,

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

bye,

 Jean
Title: Re: Screen Tap OR Hold
Post by: escpodgames on August 28, 2012, 06: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.
Title: Re: Screen Tap OR Hold
Post by: escpodgames on August 28, 2012, 07: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?
Title: Re: Screen Tap OR Hold [SOLVED]
Post by: escpodgames on August 28, 2012, 07: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