• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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 23
Joined
Jun 26, 2020
Messages
1,838
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