Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: gregacuna on March 11, 2020, 12:29:14 AM

Title: Tap to Dismiss Game Title Screen[SOLVED]
Post by: gregacuna on March 11, 2020, 12:29:14 AM
I know this is a super simple thing, but unfortunately I haven't been able to figure it out after trying several different ideas. Very strange. Trying to make it so when a player taps mobile screen during the game title it immediately loads the next scene. Have tried a few different actions, even tried making a button the size of the whole screen, but just can't get it to work.

I have a Canvas (Screen Space - Overlay) with a Image set to 1920x1080 set to stretch full screen. What do I use to catch a mobile screen tap and then move to the Load Scene state/action?
Title: Re: Tap to Dismiss Game Title Screen
Post by: jeanfabre on March 11, 2020, 02:28:58 AM
Hi,

Simple turn your image into a button and catch the onClick.

Bye,

 Jean
Title: Re: Tap to Dismiss Game Title Screen
Post by: gregacuna on March 12, 2020, 08:51:26 AM
Jean...would that be the "UI Button On Click Event" action or am I missing something?
Title: Re: Tap to Dismiss Game Title Screen
Post by: DanielThomas on March 12, 2020, 09:42:59 AM
You can either use the Onclick event from the button component. Or you can add a global transition 'UI Events/ON CLICK'. I haven't tried the actions, but I'm guessing those should work as well.

If none of those works it's probably because your setup is not working. Make sure it/the parent canvas has Graphic Raycaster component.
Title: Re: Tap to Dismiss Game Title Screen
Post by: Broken Stylus on March 13, 2020, 07:24:48 AM
For information, the OnClick event is sent when the pressure is relieved, that is, when the finger is lifted, like a mouse click.

If you want an event to be sent as soon as the button is touched, you may require PointerDown which can be managed through the Event Trigger component. it's one rare component that cannot be deactivated, so you need to combine it with a Canvas Group component and control the Block Raycasts boolean and set it to false to neutralize the Event Trigger (it ignores the Interactable flag).

Or, instead, you can use Playmaker's UI POINTER DOWN.
Title: Re: Tap to Dismiss Game Title Screen
Post by: gregacuna on March 14, 2020, 03:11:12 AM
I was still struggling with this, but found a very short video which solved the problem for me. I was trying to trigger a global event from the button, but I didn't have it setup properly. If anyone else has this challenge please check out the video by Phoenix Grimm at: https://www.youtube.com/watch?time_continue=55&v=MowG-3LjXFs&feature=emb_logo

Quick and concise explanation which not only solve this problem for me, but also taught me a key thing about triggering events.

Thanks everyone for your help!