1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. The Secrets of Warcraft 3 have revealed interesting works. The RESULTS for Abelhawk's Mini-Mapping Contest #15 have come out!
    Dismiss Notice
  7. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  8. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  9. Night Rider gained several songs for his journey. The poll for the 12th Music Contest has started. Check it out!
    Dismiss Notice
  10. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  11. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Mouse Movement System v1.2a

Submitted by xorkatoss
This bundle is marked as approved. It works and satisfies the submission rules.
Well since new Warcraft 3 patch brought mouse movement I thought why not?
Pretty easy to make System if you have general knowledge of GUI.

The use of this system:
Press and Hold the Right Click button and your hero will follow it around.

WARNING!
Setting the periodic event too low will cause walk animation problems.

UPDATE:
I found this by accident and thought why not update it? people were complaining because it didn't support 24 players before so now it does >_<

Also added a trigger for changing the "MouseUnit" when a player selects a different unit.
  • Mouse Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ------------Set the Number of Players you want the System to use----------- --------
      • Set MouseMaxPlayers = 24
      • -------- ------------------------------------------------------------------------------------------------------------- --------
      • -------- ------------Register the Units you want to be used for each Player----------- --------
      • Set MouseUnit[1] = Blademaster 0001 <gen>
      • Set MouseUnit[2] = Blademaster 0002 <gen>
      • Set MouseUnit[3] = Blademaster 0003 <gen>
      • Set MouseUnit[4] = Blademaster 0004 <gen>
      • Set MouseUnit[5] = Blademaster 0005 <gen>
      • Set MouseUnit[6] = Blademaster 0006 <gen>
      • Set MouseUnit[7] = Blademaster 0007 <gen>
      • Set MouseUnit[8] = Blademaster 0008 <gen>
      • Set MouseUnit[9] = Blademaster 0009 <gen>
      • Set MouseUnit[10] = Blademaster 0010 <gen>
      • Set MouseUnit[11] = Blademaster 0011 <gen>
      • Set MouseUnit[12] = Blademaster 0012 <gen>
      • Set MouseUnit[13] = Blademaster 0000 <gen>
      • Set MouseUnit[14] = Blademaster 0025 <gen>
      • Set MouseUnit[15] = Blademaster 0026 <gen>
      • Set MouseUnit[16] = Blademaster 0027 <gen>
      • Set MouseUnit[17] = Blademaster 0028 <gen>
      • Set MouseUnit[18] = Blademaster 0029 <gen>
      • Set MouseUnit[19] = Blademaster 0030 <gen>
      • Set MouseUnit[20] = Blademaster 0031 <gen>
      • Set MouseUnit[21] = Blademaster 0032 <gen>
      • Set MouseUnit[22] = Blademaster 0033 <gen>
      • Set MouseUnit[23] = Blademaster 0034 <gen>
      • Set MouseUnit[24] = Blademaster 0035 <gen>
      • -------- ------------------------------------------------------------------------------------------------------------- --------
      • -------- ------------------------------------------------------------------------------------------------------------- --------
      • -------- ---------------------------DONT EDIT ANYTHING BELOW---------------------------- --------
      • -------- ------------------------------------------------------------------------------------------------------------- --------
      • -------- Check if Player is Human --------
      • For each (Integer Mouse_i) from 1 to MouseMaxPlayers, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player(Mouse_i)) controller) Equal to User
              • ((Player(Mouse_i)) slot status) Equal to Is playing
            • Then - Actions
              • -------- register mouse click --------
              • Trigger - Add to Mouse Click <gen> the event (Player - (Player(Mouse_i)) issues Mouse Down event)
              • -------- register mouse release --------
              • Trigger - Add to Mouse Release <gen> the event (Player - (Player(Mouse_i)) issues Mouse Up event)
              • -------- register mouse detect --------
              • Trigger - Add to Mouse Detect <gen> the event (Player - (Player(Mouse_i)) issues Mouse Move event)
              • -------- register unit selection --------
              • Trigger - Add to Mouse ChangeUnit <gen> the event (Player - (Player(Mouse_i)) Selects a unit)
            • Else - Actions[
  • Mouse Click
    • Events
    • Conditions
      • (Trigger Mouse Button) Equal to Right Mouse Button
    • Actions
      • Set MouseClick[(Player number of (Triggering player))] = True
  • Mouse Release
    • Events
    • Conditions
      • (Trigger Mouse Button) Equal to Right Mouse Button
    • Actions
      • Set MouseClick[(Player number of (Triggering player))] = False
  • Mouse Detect
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MouseClick[(Player number of (Triggering player))] Equal to True
        • Then - Actions
          • Set MouseX[(Player number of (Triggering player))] = (Mouse Position X for Triggered Mouse Event)
          • Set MouseY[(Player number of (Triggering player))] = (Mouse Position Y for Triggered Mouse Event)
        • Else - Actions
  • Mouse ChangeUnit
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to (Triggering player)
        • Then - Actions
          • Set MouseUnit[(Player number of (Triggering player))] = (Triggering unit)
        • Else - Actions
  • Mouse UnitMove
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Mouse_i) from 1 to MouseMaxPlayers, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • MouseClick[Mouse_i] Equal to True
                  • MouseX[Mouse_i] Not equal to 0.00
                  • MouseY[Mouse_i] Not equal to 0.00
            • Then - Actions
              • Set MousePoint = (Point(MouseX[Mouse_i], MouseY[Mouse_i]))
              • Unit - Order MouseUnit[Mouse_i] to Move To MousePoint
              • Custom script: call RemoveLocation(udg_MousePoint)
            • Else - Actions
Contents

Mouse Movement System v1.2a (Map)

Reviews
Dr Super Good
Comments and Suggestions: Due to the simplicity it is potentially useful as a starting step for mouse based movement systems similar to those in the Diablo series. Additionally there are a lot of nice comments in the resource thread with alternative...
  1. Marcos_M

    Marcos_M

    Joined:
    Jan 23, 2011
    Messages:
    347
    Resources:
    0
    Resources:
    0
    This would allow you to move your Hero even when you don't have it selected, i never thought of that
     
  2. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,270
    Resources:
    6
    Models:
    1
    Icons:
    1
    Spells:
    3
    JASS:
    1
    Resources:
    6
    A little bit of heads up,

    How about the other 12 players?

    In unit-move, you can remove the condition that both coordinates must not be zero since you only need the flag variable in order to move them.
     
  3. GhostHunter123

    GhostHunter123

    Joined:
    Oct 17, 2012
    Messages:
    438
    Resources:
    1
    Spells:
    1
    Resources:
    1
    • Untitled Trigger 001
      • Events
      • Conditions
      • Actions
        • For each (Integer A) from 1 to 24, do (Actions)
          • Loop - Actions
            • Trigger - Add to (This trigger) the event (Player - (Player((Integer A))) issues Mouse Down event)
            • Trigger - Add to (This trigger) the event (Player - (Player((Integer A))) issues Mouse Up event)
            • Trigger - Add to (This trigger) the event (Player - (Player((Integer A))) issues Mouse Move event)


    • Player Group - Pick every player in (All players) and do (Actions)
      • Loop - Actions
        • Trigger - Add to (This trigger) the event (Player - (Picked player) issues Mouse Down event)
        • Trigger - Add to (This trigger) the event (Player - (Picked player) issues Mouse Up event)
        • Trigger - Add to (This trigger) the event (Player - (Picked player) issues Mouse Move event)
     
  4. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,270
    Resources:
    6
    Models:
    1
    Icons:
    1
    Spells:
    3
    JASS:
    1
    Resources:
    6
    I was thinking of something like that, only utilizing the native
    native GetTriggerEventId takes nothing returns eventid 
    if it has a GUI equivalent.

    On the specified triggers (Mouse Click, Detect and Release), remove the already included events and replace them with map initialization. Upon Map Initialization (this is where GetTriggerEventId() comes in, a condition), do a loop from Player 1 to 24, which will include those events anyway.
     
  5. xorkatoss

    xorkatoss

    Joined:
    Jul 12, 2010
    Messages:
    1,506
    Resources:
    7
    Models:
    5
    Maps:
    1
    Spells:
    1
    Resources:
    7
    yeah it can definitely be helpful in hero arenas, you could theoretically move your hero and keep selected a dummy unit with 12 different abilities for example :D

    Adding more players it's not hard actually all you have to do is register the units and increase the loop to 24 players.

    I'm not sure I understand what you said about flag variable...although the X & Y mouse detection is essential because if you read the trigger comment in "unit move" I said:
    "If MouseX is 0.00 and MouseY is 0.0 then it means the mouse is on the User Interface."
    if you order the unit to move while player mouse is on the UI it automatically orders it to move in center of the map so I had to use X & Y detection to avoid that hassle.

    Yes I know I could have used that but I thought it might bring map lag when you enter game in huge maps with a lot of setup triggers that loop actions.

    Perhaps I could include it in a separate trigger and have it disabled.
     
  6. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,270
    Resources:
    6
    Models:
    1
    Icons:
    1
    Spells:
    3
    JASS:
    1
    Resources:
    6
    ^^ @xorkatoss

    The flag variable is the Mouse Click Boolean variable. Also, if done on map initialization, the worrisome lag wouldn't really matter.
     
  7. apsyll

    apsyll

    Joined:
    Aug 28, 2015
    Messages:
    189
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I got also inspired by the new mouse natives and come up with this system after seeing yours I think this could get some inspiration.

    • Input Initialization
      • Events
        • Time - Elapsed game time is 0.30 seconds
      • Conditions
      • Actions
        • -------- the maximum amount of time that can pass before it's not counted as double ckilck anymore --------
        • Set Input_DCFrequenceTime = 0.20
        • For each (Integer Input_Index) from 1 to Game_MaxPlayer, do (Actions)
          • Loop - Actions
            • Trigger - Add to Input MouseDown <gen> the event (Player - (Player(Input_Index)) issues Mouse Down event)
            • Trigger - Add to Input MouseUp <gen> the event (Player - (Player(Input_Index)) issues Mouse Up event)
            • Trigger - Add to Input MouseMove <gen> the event (Player - (Player(Input_Index)) issues Mouse Move event)
            • Set Input_IsLeftClicked[Input_Index] = False
            • Set Input_IsMiddleClicked[Input_Index] = False
            • Set Input_IsRightClicked[Input_Index] = False
            • Trigger - Add to Input RestetDoubleClick <gen> the event (Time - Input_DCTimerLeft[Input_Index] expires)
            • Set Input_IsDoubleClickingL[Input_Index] = False
            • Trigger - Add to Input RestetDoubleClick <gen> the event (Time - Input_DCTimerMiddle[Input_Index] expires)
            • Set Input_IsDoubleClickingM[Input_Index] = False
            • Trigger - Add to Input RestetDoubleClick <gen> the event (Time - Input_DCTimerRight[Input_Index] expires)
            • Set Input_IsDoubleClickingR[Input_Index] = False
    • Input MouseUp
      • Events
      • Conditions
      • Actions
        • Set Input_PlayerID = (Player number of (Triggering player))
        • Set Input_MousePoint[Input_PlayerID] = (Mouse Position for Triggered Mouse Event)
        • Set Input_MouseX[Input_PlayerID] = (Mouse Position X for Triggered Mouse Event)
        • Set Input_MouseY[Input_PlayerID] = (Mouse Position Y for Triggered Mouse Event)
        • -------- Left --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Trigger Mouse Button) Equal to Left Mouse Button
          • Then - Actions
            • -------- Left Up --------
            • Set Input_IsLeftClicked[Input_PlayerID] = False
            • -------- Start timer to check for double click --------
            • Set Input_IsDoubleClickingL[Input_PlayerID] = True
            • Countdown Timer - Start Input_DCTimerLeft[Input_PlayerID] as a One-shot timer that will expire in Input_DCFrequenceTime seconds
          • Else - Actions
        • -------- Right --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Trigger Mouse Button) Equal to Right Mouse Button
          • Then - Actions
            • -------- Right Up --------
            • Set Input_IsRightClicked[Input_PlayerID] = False
            • -------- Start timer to check for double click --------
            • Set Input_IsDoubleClickingR[Input_PlayerID] = True
            • Countdown Timer - Start Input_DCTimerRight[Input_PlayerID] as a One-shot timer that will expire in Input_DCFrequenceTime seconds
          • Else - Actions
        • -------- Middle --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Trigger Mouse Button) Equal to Middle Mouse Button
          • Then - Actions
            • -------- Middle Up --------
            • Set Input_IsMiddleClicked[Input_PlayerID] = False
            • -------- Start timer to check for double click --------
            • Set Input_IsDoubleClickingM[Input_PlayerID] = True
            • Countdown Timer - Start Input_DCTimerMiddle[Input_PlayerID] as a One-shot timer that will expire in Input_DCFrequenceTime seconds
          • Else - Actions
    • Input MouseDown
      • Events
      • Conditions
      • Actions
        • Set Input_PlayerID = (Player number of (Triggering player))
        • Set Input_MousePoint[Input_PlayerID] = (Mouse Position for Triggered Mouse Event)
        • Set Input_MouseX[Input_PlayerID] = (Mouse Position X for Triggered Mouse Event)
        • Set Input_MouseY[Input_PlayerID] = (Mouse Position Y for Triggered Mouse Event)
        • -------- Left --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Trigger Mouse Button) Equal to Left Mouse Button
            • Input_MouseX[Input_PlayerID] Not equal to 0.00
            • Input_MouseY[Input_PlayerID] Not equal to 0.00
          • Then - Actions
            • -------- Left down --------
            • Set Input_IsLeftClicked[Input_PlayerID] = True
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Input_IsDoubleClickingL[Input_PlayerID] Equal to True
              • Then - Actions
                • -------- Left double click --------
              • Else - Actions
          • Else - Actions
        • -------- Right --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Trigger Mouse Button) Equal to Right Mouse Button
            • Input_MouseX[Input_PlayerID] Not equal to 0.00
            • Input_MouseY[Input_PlayerID] Not equal to 0.00
          • Then - Actions
            • -------- Right down --------
            • Set Input_IsRightClicked[Input_PlayerID] = True
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Input_IsDoubleClickingR[Input_PlayerID] Equal to True
              • Then - Actions
                • -------- Right double click --------
              • Else - Actions
          • Else - Actions
        • -------- Middle --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Trigger Mouse Button) Equal to Middle Mouse Button
            • Input_MouseX[Input_PlayerID] Not equal to 0.00
            • Input_MouseY[Input_PlayerID] Not equal to 0.00
          • Then - Actions
            • -------- Middle down --------
            • Set Input_IsMiddleClicked[Input_PlayerID] = True
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Input_IsDoubleClickingM[Input_PlayerID] Equal to True
              • Then - Actions
                • -------- Middle double click --------
              • Else - Actions
          • Else - Actions
    • Input MouseMove
      • Events
      • Conditions
      • Actions
        • Set Input_PlayerID = (Player number of (Triggering player))
        • Set Input_MousePoint[Input_PlayerID] = (Mouse Position for Triggered Mouse Event)
        • Set Input_MouseX[Input_PlayerID] = (Mouse Position X for Triggered Mouse Event)
        • Set Input_MouseY[Input_PlayerID] = (Mouse Position Y for Triggered Mouse Event)
        • -------- Left --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Input_IsLeftClicked[Input_PlayerID] Equal to True
          • Then - Actions
            • -------- Left click drag --------
          • Else - Actions
        • -------- Right --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Input_IsRightClicked[Input_PlayerID] Equal to True
          • Then - Actions
            • -------- Right click drag --------
          • Else - Actions
        • -------- Middle --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Input_IsMiddleClicked[Input_PlayerID] Equal to True
          • Then - Actions
            • -------- Middle click drag --------
          • Else - Actions
    • Input RestetDoubleClick
      • Events
      • Conditions
      • Actions
        • For each (Integer Input_DCIndex) from 1 to Game_MaxPlayer, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Remaining time for Input_DCTimerLeft[Input_DCIndex]) Less than or equal to 0.00
                • Input_IsDoubleClickingL[Input_DCIndex] Equal to True
              • Then - Actions
                • Set Input_IsDoubleClickingL[Input_DCIndex] = False
              • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Remaining time for Input_DCTimerMiddle[Input_DCIndex]) Less than or equal to 0.00
                • Input_IsDoubleClickingM[Input_DCIndex] Equal to True
              • Then - Actions
                • Set Input_IsDoubleClickingM[Input_DCIndex] = False
              • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Remaining time for Input_DCTimerRight[Input_DCIndex]) Less than or equal to 0.00
                • Input_IsDoubleClickingR[Input_DCIndex] Equal to True
              • Then - Actions
                • Set Input_IsDoubleClickingR[Input_DCIndex] = False
              • Else - Actions
     
    Last edited: Apr 20, 2018
  8. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,156
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    As logics is anyways not too much, focus could be on providing easy usage, not caring for checks/loops himself. If you want you can take attached code, it's also jass-user friendly.


    Code (vJASS):

    // Threshold timeout to fire event for one player
    constant function MouseMovement_Timeout takes nothing returns real
        return 0.2
    endfunction

    function MouseMovement_onClick takes nothing returns nothing
        if (BlzGetTriggerPlayerMouseButton() == MOUSE_BUTTON_TYPE_RIGHT) then
            set udg_MMS_IsClicked[GetPlayerId(GetTriggerPlayer())] = true
        endif
    endfunction

    function MouseMovement_onRelease takes nothing returns nothing
        if (BlzGetTriggerPlayerMouseButton() == MOUSE_BUTTON_TYPE_RIGHT) then
            set udg_MMS_IsClicked[GetPlayerId(GetTriggerPlayer())] = false
        endif
    endfunction

    function MouseMovement_onMove takes nothing returns nothing
        local integer playerId = GetPlayerId(GetTriggerPlayer())
        if (udg_MMS_IsClicked[playerId] and TimerGetRemaining(udg_MMS_Timer[playerId]) == 0 ) then
            if MouseMovement_Timeout() > 0 then
                call TimerStart(udg_MMS_Timer[playerId], MouseMovement_Timeout(), false, null)
            endif
            set udg_MMS_X = BlzGetTriggerPlayerMouseX()
            set udg_MMS_Y = BlzGetTriggerPlayerMouseY()
            set udg_MMS_Location = Location(udg_MMS_X, udg_MMS_Y)
            set udg_MMS_Player = GetTriggerPlayer()
            set udg_MMS_Event = 1
            set udg_MMS_Event = 0
            call RemoveLocation(udg_MMS_Location)
        endif
    endfunction

    function MouseMovement_MouseRegister takes trigger t, integer ev returns nothing
        local integer i = 0
        loop
            exitwhen i > 24
            call TriggerRegisterPlayerMouseEventBJ(t, Player(i), ev)
            set i = i + 1
        endloop
    endfunction

    function InitTrig_MouseMovement takes nothing returns nothing
        local trigger t
        local integer i
     
        set t = CreateTrigger()
        call TriggerAddAction(t, function MouseMovement_onClick)
        call MouseMovement_MouseRegister(t, bj_MOUSEEVENTTYPE_DOWN)
     
        set t = CreateTrigger()
        call TriggerAddAction(t, function MouseMovement_onRelease)
        call MouseMovement_MouseRegister(t, bj_MOUSEEVENTTYPE_UP)
     
        set t = CreateTrigger()
        call TriggerAddAction(t, function MouseMovement_onMove)
        call MouseMovement_MouseRegister(t, bj_MOUSEEVENTTYPE_MOVE)
     
        set i = 0
        loop
            exitwhen i > 24
            set udg_MMS_Timer[i] = CreateTimer()
            set i = i + 1
        endloop
    endfunction


    edit:

    It would be even cooler if the timer callback would fire the event, too, so the last event is never ignored. The X/Y would have to be updated for this each run, not only when threshold allows.
     

    Attached Files:

    Last edited: Jun 18, 2018
  9. knight26

    knight26

    Joined:
    Jul 16, 2007
    Messages:
    1,124
    Resources:
    0
    Resources:
    0
    I wonder if there's a way to implement this system into the game instead of a single map?
    Could it be done? There's a number of maps where this would be very useful indeed.
     
  10. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,213
    Resources:
    16
    Tools:
    2
    Maps:
    2
    Spells:
    7
    Tutorials:
    4
    JASS:
    1
    Resources:
    16
    It is possible to overwrite/overlap "blizzard.j", with a custom "blizzard.j" in which you added aditional code.
    "blizzard.j" is used by most maps.

    Problem Multiplayer:
    Players using a custom "blizzard.j" would desync from players not using the same custom "blizzard.j".
    I am also not sure, if "Battle.net" would let you play at all or that would even count as hacking.
    Although It works in Single Player.
    Edit: I Tested it now in Lan with 2 computers (V1.30.1.10211) , Having different content in "Blizzard.j" as game lobby owner (host) leads to an autokick.
     
    Last edited: Oct 31, 2018
  11. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,427
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Required for Approval:
    There are potentially more than just 12 human players. I suggest running a loop at map initialization which adds the mouse events to the triggers. This loop should pick players from all players for maximum future proofing. The players should be filtered for active human players since creating the events for inactive slots or for computer players is pointless.
    Comments and Suggestions:
    Due to the simplicity it is potentially useful as a starting step for mouse based movement systems similar to those in the Diablo series. Additionally there are a lot of nice comments in the resource thread with alternative implementations, extensions and suggestions that people may find useful.

    Why is position (0, 0) not accepted as a valid cursor destination? A comment in the map explaining why might be useful.

    The periodic unit movement trigger should only issue a move order if the player has changed the position of their cursor since the last time the trigger ran. This would potentially help reduce animation issues as well as path finder load in some cases.​
     
  12. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,427
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Still does not check if the player is active. This is a player slot status comparison test.
     
  13. xorkatoss

    xorkatoss

    Joined:
    Jul 12, 2010
    Messages:
    1,506
    Resources:
    7
    Models:
    5
    Maps:
    1
    Spells:
    1
    Resources:
    7
    @Dr Super Good
    you mean use this?
    • ((Player(Mouse_i)) slot status) Equal to Is playing
    instead of the current:
    • ((Player(Mouse_i)) controller) Equal to User

    ??

    or should both be used to detect if human and active?
     
  14. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,427
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Both should be used. That way it will not create events for players who drop during the load screen.
     
  15. xorkatoss

    xorkatoss

    Joined:
    Jul 12, 2010
    Messages:
    1,506
    Resources:
    7
    Models:
    5
    Maps:
    1
    Spells:
    1
    Resources:
    7
  16. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,427
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Comments and Suggestions:
    Due to the simplicity it is potentially useful as a starting step for mouse based movement systems similar to those in the Diablo series. Additionally there are a lot of nice comments in the resource thread with alternative implementations, extensions and suggestions that people may find useful.

    Why is position (0, 0) not accepted as a valid cursor destination? A comment in the map explaining why might be useful.

    The periodic unit movement trigger should only issue a move order if the player has changed the position of their cursor since the last time the trigger ran. This would potentially help reduce animation issues as well as path finder load in some cases.​
     
  17. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    2,666
    Resources:
    1
    Spells:
    1
    Resources:
    1
    This is what's returned when querying mouse position while the mouse is over the UI.
     
  18. xorkatoss

    xorkatoss

    Joined:
    Jul 12, 2010
    Messages:
    1,506
    Resources:
    7
    Models:
    5
    Maps:
    1
    Spells:
    1
    Resources:
    7
    @Dr Super Good @Pyrogasm
    But I already mentioned that in the Trigger Comment of the trigger "Mouse UnitMove"
    That comment was already there from the first time I uploaded the system.
    UI00.jpg
    Reviewers don't open maps to properly test them?
     
  19. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,427
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Comments and Suggestions:
    Due to the simplicity it is potentially useful as a starting step for mouse based movement systems similar to those in the Diablo series. Additionally there are a lot of nice comments in the resource thread with alternative implementations, extensions and suggestions that people may find useful.

    The periodic unit movement trigger should only issue a move order if the player has changed the position of their cursor since the last time the trigger ran. This would potentially help reduce animation issues as well as path finder load in some cases.​