playMaker

Author Topic: Playmaker touch event  (Read 1232 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Playmaker touch event
« on: November 30, 2018, 04:05:10 AM »
Hi !

I wanna send an event "Start Game" when player single tap on any part of screen.
I don't know where should i write FSM & which transition should i select ?



heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Playmaker touch event
« Reply #1 on: December 01, 2018, 07:23:37 AM »
It sucks when all admin and mods took holiday at same time  >:( >:(

Athin

  • Full Member
  • ***
  • Posts: 163
Re: Playmaker touch event
« Reply #2 on: December 02, 2018, 08:55:48 PM »
Hey there,

Just need to be patient waiting for someone to reply.

This will heavily depend on how you set up everything but a nice easy way may be to have 1 FSM just listening for the first touch and when it receives it, broadcast an event to all telling them they can start. 

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker touch event
« Reply #3 on: December 03, 2018, 01:02:51 AM »
Hi,

 No holidays, just a regular week end :) don't forget we have time zone differences, I am in Russia for example, so if you write late in your day, I'll only get it in the my morning.

I actually very very rarely check forum or answer during the week end as well :)

Onto your question :

Athin is right, a single empty gameobject, with 1 fsm that listen to the mouse up and then broadcast a global event "START GAME"

another way is to have a canvas with a button that takes up the whole screen ( the button can be visually transparent, it doesn't have to be visual, it's just catches touches and mouse input)

then you listen to that button on click event and broadcast your START GAME and disable the button.

Bye,

 Jean

Bye,

 Jean