# Mouse Moved

Grammar — Player player moves mouse.
FlagsNative | Event

Only register for this event when you absolutely need it, as it will generate network traffic from all players for every mouse move they make. This event fires when a player moves themouse. Use “Mouse Moved UI Pos X” and “Mouse Moved UI Pos Y” to get the UI X,Y position where the player moved the mouse. Use “Mouse Moved World Pos X”, “Mouse Moved World Pos Y”, and “Mouse Moved World Pos Z” to get the X,Y,Z world position where the player moved the mouse.

# Arguments

  • int — Player

Returns — void

native void TriggerAddEventMouseMoved(
	trigger t,
	int player,
);

# Event parameters

Category: UI / Input

# Examples

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:6595

    libVCUI_gt_PU_ArmyRotateUnit = TriggerCreate("libVCUI_gt_PU_ArmyRotateUnit_Func");
    TriggerEnable(libVCUI_gt_PU_ArmyRotateUnit, false);
    TriggerAddEventMouseMoved(libVCUI_gt_PU_ArmyRotateUnit, c_playerAny);
}

mods/frontiers.sc2modbase.sc2data/Lib6CB3363F.galaxy:1673

void lib6CB3363F_gt_MouseMoveUpdate_Init () {
    lib6CB3363F_gt_MouseMoveUpdate = TriggerCreate("lib6CB3363F_gt_MouseMoveUpdate_Func");
    TriggerAddEventMouseMoved(lib6CB3363F_gt_MouseMoveUpdate, c_playerAny);
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:8029

    libGDHL_gv_heroChenWanderingKegHealthStore[lv_player] = UnitGetPropertyFixed(lv_chen, c_unitPropLife, c_unitPropCurrent);
    if ((libGDHL_gv_heroChenWanderingKegEventAdded[lv_player] == false)) {
        TriggerAddEventMouseMoved(libGDHL_gt_HeroChenWanderingKegMoveTracker, EventPlayer());
    }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:23203

    CatalogFieldValueSetFixed(c_gameCatalogUnit, "HeroTinker", "StationaryTurningRate", lv_player, libGDHL_gv_heroTinkerDethLazorMaxTurnRate);
    if ((PlayerHasTalent(lv_player, "TinkerTalentFirinMahLazorz") == true)) {
        TriggerAddEventMouseMoved(libGDHL_gt_HeroTinkerDethLazorAim, EventPlayer());
    }

mods/heromods/chogall.stormmodbase.stormdata/LibHCHO.galaxy:907

    libHCHO_gv_surgingFistActiveFlag[UnitGetOwner(lv_cho)] = true;
    libHCHO_gv_surgingFistActiveCasters = (libHCHO_gv_surgingFistActiveCasters + 1);
    TriggerAddEventMouseMoved(libHCHO_gt_SurgingFistMouseTracker, EventPlayer());
    TriggerEnable(libHCHO_gt_SurgingFistMouseTracker, true);
    while ((UnitHasBehavior2(lv_cho, "ChoSurgingFistInitialFakeCast") == true)) {

mods/heromods/chogall.stormmodbase.stormdata/LibHCHO.galaxy:1782

    libHCHO_gf_HeroChogallGallFollow(libGDHL_gv_chogallPairs[lv_chogallTeam].lv_gallUnit);
    UISetCommandAllowed(PlayerGroupSingle(lv_gallPlayer), c_uiCommandAllowQueue, false);
    TriggerAddEventMouseMoved(libHCHO_gt_SurgingFistMouseTracker, lv_gallPlayer);
    TriggerAddEventMouseClicked(libHCHO_gt_SurgingFistExecuteChargetomouse, lv_gallPlayer, c_mouseButtonLeft,true);
    TriggerAddEventPlayerEffectUsed(libHCHO_gt_SurgingFistExecuteChargetomouse, lv_gallPlayer,"ChoSurgingFistTriggerDummyEffect");