Warcraft III resources & community, 2003–2006 · archived

Mouse Button Click Event?

3 posts
#1

Mouse Button Click Event?

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
#2
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.
#3
Thanks for the quick responce, I'll go read up on trackables..