# Mouse Clicked World Pos X
Grammar — Mouse X position clicked in the world
Flags —Native
|Function
Returns the mouse position clicked in the X axis. Use in response to a “Mouse Clicked” event.
Returns — fixed
native fixed EventMouseClickedPosXWorld();
# Supported triggers
- Mouse Clicked — TriggerAddEventMouseClicked
# Related
Category: UI / Input
- Key Pressed —
void
— TriggerAddEventKeyPressed - Hotkey Pressed —
void
— TriggerAddEventHotkeyPressed - Button Pressed —
void
— TriggerAddEventButtonPressed - Mouse Clicked —
void
— TriggerAddEventMouseClicked - Mouse Moved —
void
— TriggerAddEventMouseMoved - Mouse Wheel —
void
— TriggerAddEventMouseWheel - Button Pressed —
string
<gamelink::Button> — EventButtonPressed - Key Pressed —
int
<preset::Key> — EventKeyPressed - Hotkey Pressed —
int
<preset::Key> — EventHotkeyPressed - Control Key Pressed —
bool
— EventKeyControl - Alt Key Pressed —
bool
— EventKeyAlt - Shift Key Pressed —
bool
— EventKeyShift - Mouse Clicked Button —
int
<preset::MouseButton> — EventMouseClickedButton - Mouse Clicked UI Pos X —
int
— EventMouseClickedPosXUI - Mouse Clicked UI Pos Y —
int
— EventMouseClickedPosYUI - Mouse Clicked World Pos X —
fixed
— EventMouseClickedPosXWorld - Mouse Clicked World Pos Y —
fixed
— EventMouseClickedPosYWorld - Mouse Clicked World Pos Z —
fixed
— EventMouseClickedPosZWorld - Mouse Moved UI Pos X —
int
— EventMouseMovedPosXUI - Mouse Moved UI Pos Y —
int
— EventMouseMovedPosYUI - Mouse Moved World Pos X —
fixed
— EventMouseMovedPosXWorld - Mouse Moved World Pos Y —
fixed
— EventMouseMovedPosYWorld - Mouse Moved World Pos Z —
fixed
— EventMouseMovedPosZWorld - Mouse Wheel Spin —
fixed
— EventMouseWheelSpin
# Examples
mods/heromods/yrel.stormmod — base.stormdata/LibHYRL.galaxy:355
if ((UnitHasBehavior2(lv_heroUnit, "YrelRighteousHammerChannelBuff") == true)) {
UnitIssueOrder(lv_heroUnit, OrderTargetingPoint(AbilityCommand("YrelRighteousHammer", 0), Point(EventMouseClickedPosXWorld(), EventMouseClickedPosYWorld())), c_orderQueueReplace);
return true;
}
mods/heromods/yrel.stormmod — base.stormdata/LibHYRL.galaxy:360
if ((UnitGetType(libGame_gv_players[lv_playerID].lv_heroUnit) == "HeroAbathur") && (UnitHasBehavior2(libGame_gv_players[lv_playerID].lv_activeVehicle, "YrelRighteousHammerChannelBuff") == true)) {
UnitIssueOrder(libGame_gv_players[lv_playerID].lv_activeVehicle, OrderTargetingPoint(AbilityCommand("YrelRighteousHammer", 0), Point(EventMouseClickedPosXWorld(), EventMouseClickedPosYWorld())), c_orderQueueReplace);
}
mods/heromods/yrel.stormmod — base.stormdata/LibHYRL.galaxy:449
if ((UnitHasBehavior2(lv_heroUnit, "YrelAvengingWrathChannelBuff") == true)) {
UnitIssueOrder(lv_heroUnit, OrderTargetingPoint(AbilityCommand("YrelAvengingWrath", 0), Point(EventMouseClickedPosXWorld(), EventMouseClickedPosYWorld())), c_orderQueueReplace);
return true;
}
mods/heromods/yrel.stormmod — base.stormdata/LibHYRL.galaxy:454
if ((UnitGetType(libGame_gv_players[lv_playerID].lv_heroUnit) == "HeroAbathur") && (UnitHasBehavior2(libGame_gv_players[lv_playerID].lv_activeVehicle, "YrelAvengingWrathChannelBuff") == true)) {
UnitIssueOrder(libGame_gv_players[lv_playerID].lv_activeVehicle, OrderTargetingPoint(AbilityCommand("YrelAvengingWrath", 0), Point(EventMouseClickedPosXWorld(), EventMouseClickedPosYWorld())), c_orderQueueReplace);
}