playMaker

Author Topic: Get button down but using a UI button [SOLVED]  (Read 1596 times)

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Get button down but using a UI button [SOLVED]
« on: November 28, 2019, 04:47:29 PM »
What I am trying to do is when the user selects the fire icon the weapon will fire until the player releases the button.

I noticed that playmaker added an event trigger (script) does the answer lie here?

At the moment the action only happens when I let go of the UI button.

But the firing continues until the end of the clip.

I did look at the pointer down and pointer up and the get last pointer data, but I'm having trouble understanding how to use it.

The controls are for use with mobile development. Should I be using a touch event?

« Last Edit: November 29, 2019, 04:01:11 AM by colpolstudios »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get button down but using a UI button
« Reply #1 on: November 29, 2019, 03:10:48 AM »
Hi,

Simply use "UI POINTER DOWN" and "UI POINTER UP" global event as local transition of your current active state, then you are sure to only watch for down and up in the right context.

Bye,

 Jean

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: Get button down but using a UI button
« Reply #2 on: November 29, 2019, 04:00:47 AM »
Thanks that worked. The quickest fix yet.