# Mouse Moved World Pos X
Grammar — Mouse X position in the world
Flags —Native
|Function
Returns the mouse position in the X axis. Use in response to a “Mouse Moved” event.
Returns — fixed
native fixed EventMouseMovedPosXWorld();
# Supported triggers
- Mouse Moved — TriggerAddEventMouseMoved
# 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/frontiers.sc2mod — base.sc2data/Lib6CB3363F.galaxy:1665
}
lib6CB3363F_gv_fT_MousePosX[EventPlayer()] = EventMouseMovedPosXWorld();
lib6CB3363F_gv_fT_MousePosY[EventPlayer()] = EventMouseMovedPosYWorld();
return true;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:8101
if ((UnitGetType(libGame_gv_players[lv_player].lv_activeVehicle) == "HeroChen")) {
libGDHL_gv_heroChenWanderingKegMoveTo[lv_player] = Point(EventMouseMovedPosXWorld(), EventMouseMovedPosYWorld());
libGDHL_gv_heroChenWanderingKegAngleMoveTo[lv_player] = AngleBetweenPoints(UnitGetPosition(libGame_gv_players[lv_player].lv_activeVehicle), Point(EventMouseMovedPosXWorld(), EventMouseMovedPosYWorld()));
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:8102
if ((UnitGetType(libGame_gv_players[lv_player].lv_activeVehicle) == "HeroChen")) {
libGDHL_gv_heroChenWanderingKegMoveTo[lv_player] = Point(EventMouseMovedPosXWorld(), EventMouseMovedPosYWorld());
libGDHL_gv_heroChenWanderingKegAngleMoveTo[lv_player] = AngleBetweenPoints(UnitGetPosition(libGame_gv_players[lv_player].lv_activeVehicle), Point(EventMouseMovedPosXWorld(), EventMouseMovedPosYWorld()));
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:8106
if ((UnitGetType(libGame_gv_players[lv_player].lv_heroUnit) == "HeroChen")) {
libGDHL_gv_heroChenWanderingKegMoveTo[lv_player] = Point(EventMouseMovedPosXWorld(), EventMouseMovedPosYWorld());
libGDHL_gv_heroChenWanderingKegAngleMoveTo[lv_player] = AngleBetweenPoints(UnitGetPosition(libGame_gv_players[lv_player].lv_heroUnit), Point(EventMouseMovedPosXWorld(), EventMouseMovedPosYWorld()));
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:8107
if ((UnitGetType(libGame_gv_players[lv_player].lv_heroUnit) == "HeroChen")) {
libGDHL_gv_heroChenWanderingKegMoveTo[lv_player] = Point(EventMouseMovedPosXWorld(), EventMouseMovedPosYWorld());
libGDHL_gv_heroChenWanderingKegAngleMoveTo[lv_player] = AngleBetweenPoints(UnitGetPosition(libGame_gv_players[lv_player].lv_heroUnit), Point(EventMouseMovedPosXWorld(), EventMouseMovedPosYWorld()));
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:23235
}
libGDHL_gv_heroTinkerFirinMahLazorzMousePositionX[EventPlayer()] = EventMouseMovedPosXWorld();
libGDHL_gv_heroTinkerFirinMahLazorzMousePositionY[EventPlayer()] = EventMouseMovedPosYWorld();
return true;
mods/heromods/chogall.stormmod — base.stormdata/LibHCHO.galaxy:943
}
libHCHO_gv_surgingFistMousePosition[EventPlayer()] = Point(EventMouseMovedPosXWorld(), EventMouseMovedPosYWorld());
return true;
}