Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!

Triggers/Events/Mouse Clicked

From SC2Mapster Wiki
Jump to: navigation, search


Mouse Clicked


UI - Player player clicks button|Button mouse button down|up/down.

Galaxy Code

void TriggerAddEventMouseClicked (trigger t,int player,int mouseButton,bool down)


Only register for this event when you absolutely need it, as it will generate network traffic from all players for every mouse click they make. This event fires when a player clicks a mouse button. Use "Mouse Clicked Button" to get the button that was clicked. Use "Mouse Clicked UI Pos X" and "Mouse Clicked UI Pos Y" to get the UI X,Y position where the player clicked the mouse. Use "Mouse Clicked World Pos X", "Mouse Clicked World Pos Y", and "Mouse Clicked World Pos Z" to get the X,Y,Z world position where the player clicked the mouse. Use "Alt Key Pressed", "Control Key Pressed", and "Shift Key Pressed" to find out what modifier keys were pressed.