• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Mouse Button Click Event?

Status
Not open for further replies.
Level 2
Joined
Aug 29, 2004
Messages
3
Thanks for taking the time to read this.

I need to write a custom trigger with the event being;

Events - Player 1 clicks left mouse button
Conditions -
Actions - Set Player 1 gold equal (Player 1 gold - 1)

the conditions and actions I can write myself, I just added them to this example so you have a better idea of what I'm trying for.

Thanks
 
Level 3
Joined
Mar 27, 2004
Messages
70
There is no way to specifically detect the left mouse button click.

However, you can cover the entire map by trackables (or one biiig trackable), and detect its hit event. In that case, it will trigger for left and right mouse button alike, and there will be a few side effects like units' selection circles not appearing while being hovered.
It will still not catch a mouse click inside the UI, like if the player clicks a unit's potrait for example.

You can read about trackables in my trackable tutorial, if you want.
 
Level 24
Joined
Jun 26, 2020
Messages
1,915
even with the memory hack?
You can do it in the new versions:
  • Mouse
    • Events
      • Player - Player 1 (Red) issues Mouse Down event
      • Player - Player 1 (Red) issues Mouse Up event
      • Player - Player 1 (Red) issues Mouse Move event
    • Conditions
      • (Trigger Mouse Button) Equal to Left Mouse Button
      • (Trigger Mouse Button) Equal to Middle Mouse Button
      • (Trigger Mouse Button) Equal to Right Mouse Button
    • Actions
 
Status
Not open for further replies.
Top