playMaker

Author Topic: Test for Right or Left mouse button  (Read 2040 times)

caesarhernandez

  • Playmaker Newbie
  • *
  • Posts: 30
Test for Right or Left mouse button
« 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".

caesarhernandez

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Test for Right or Left mouse button
« Reply #1 on: May 14, 2014, 07:30:45 PM »
Currently I have two FSM objects - one for each button; is this the only way?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Test for Right or Left mouse button
« Reply #2 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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D