playMaker

Author Topic: Mouse click not working after used 4/5 times[SOLVED]  (Read 763 times)

Ronnie gaikwad

  • Playmaker Newbie
  • *
  • Posts: 22
Mouse click not working after used 4/5 times[SOLVED]
« on: September 20, 2019, 03:14:39 PM »
i,m using mouse button down to move the player to a target position by using itween move..and i use mouse button up to bring back the player from target position to intial position..it works fine.. but problem comes when i click (mouse button down) 4/5/6 times rapidly then there is no transition from state 2 to state 1 and the roller freezes to the target position and doesnot come back to its start position.. the game im making may needs rapid clicks.. how to solve it? and prevent the player from getting freezed? I have added the fsm images and also one runtime fsm image which shows how it freezes and not return back to the first state if i click rapidly.
« Last Edit: September 23, 2019, 08:20:06 AM by djaydino »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Mouse click not working after used 4/5 times
« Reply #1 on: September 21, 2019, 01:56:05 PM »
Hi
In this case you might need to use "Get Mouse Button' Action
use a variable in Store Result.

Then use 'Bool Test' Action.
Place the Variable that you stored from above in the Bool Variable.
On 'IS True' place your 'Tap' event
Also turn on Every Frame.
You might also want to use a 'Finished event' on the tween.

If you want that the tween gets interrupted, then you should ignore the above and do this :
On State 2 add the action 'Get Mouse Button Up' and place an event on it, to go back to state 1
if the tween is moving something and it needs to go back to the initiative position,
Then instead of going back to state 1 directly, place a new state in between and use "Set Position" to place back to the previous position.

Ronnie gaikwad

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Mouse click not working after used 4/5 times
« Reply #2 on: September 23, 2019, 12:23:47 AM »
Thank you so much.