Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: caesarhernandez on May 14, 2014, 07:21:03 PM

Title: Test for Right or Left mouse button
Post by: caesarhernandez on May 14, 2014, 07:21:03 PM
How can I test if the left or mouse button has been pressed? If the right button is pressed, I want to hit state "foo"; and if the left is pressed it should go to "bar".
Title: Re: Test for Right or Left mouse button
Post by: caesarhernandez on May 14, 2014, 07:30:45 PM
Currently I have two FSM objects - one for each button; is this the only way?
Title: Re: Test for Right or Left mouse button
Post by: Lane on May 14, 2014, 08:21:28 PM
You can use Get Mouse Button Down and send events from there, using Get Mouse Button Up to return.

Or

In another FSM you can use Get Mouse Button and store it in a bool. This is the pressed state of the button, 1 is down, 0 is up. After you've got the bool you can use a Bool Test to send an event based on its status.