• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Left Click Ruins Arrow Key inputs? Any Fix?

Status
Not open for further replies.
Level 4
Joined
Apr 16, 2018
Messages
47
Well, I have need of the arrow key inputs, but whenever I release one of them while the left click on my mouse is pressed down; it does not register the release happening. So the button remains showing as pressed which is really not good if you have movement tied to it for example. You have to repress and release it just to unset it before moving normally.

Is there any way to fix it so that left click does not effect them at all?
 
That sounds strange.

Can you try this in an empty map to make sure it is not another trigger that messes it up somehow.
And, if so share the map so it can be downloaded and tested.

I'm not gonna say it's impossible but I have never heard of it before and it sounds like a very common problem if you could not use mouse and arrow keys in paralel.
 
Here's a simple workaround:
  • Untitled Trigger
    • Events
      • Player - Player 1 (Red) issues Mouse Down event
    • Conditions
      • (Trigger Mouse Button) Equal to Left Mouse Button
    • Actions
      • Cinematic - Disable user control for Player Group - Player 1 (Red)
      • Cinematic - Enable user control for Player Group - Player 1 (Red)
This will disable drag selection though.
 
Here's a simple workaround:
  • Untitled Trigger
    • Events
      • Player - Player 1 (Red) issues Mouse Down event
    • Conditions
      • (Trigger Mouse Button) Equal to Left Mouse Button
    • Actions
      • Cinematic - Disable user control for Player Group - Player 1 (Red)
      • Cinematic - Enable user control for Player Group - Player 1 (Red)
This will disable drag selection though.
Unfortunately does not seem to fix the problem. Tried it in the demo map attached here, and on my actual product. Same issue persists. xD
 
Yes, Warcraft 3 dosen't register that if you hold the left mouse button.

Do you need to select units? Otherwise you can just put a invisible UI-Rectanlge across the screen. Then you can click left as much as you want. However you loose the ability to select items and units.
 
I need the ability to see where my mouse is in relation to my character, and also be able to click to shoot in that direction. I do not really need to select things. I notice that the mouse works fine with the bottom ui, but if moved over the top ui the tracking of mouse tracking is ruined, but it no longer causes the issue stated here. So this I can see is indeed one way to fix, but unfortunately it also adds a new problem that may be a tad worse for my map. T.T

At least I assume that the top of ui by default is the thing you replicate by doing that with rectangle. Not sure how to even do that one.
 
You could use the right mouse button instead of left for shooting, since this issue only happens with left mouse button.
You could also use a keyboard button for shooting.
 
You could use the right mouse button instead of left for shooting, since this issue only happens with left mouse button.
You could also use a keyboard button for shooting.
Yea, that is the plan if I absolutely cannot find a way to solve the issue. =/
It is just a bit odd/awkward to use the right click instead of left click which most games use. So Ideally fixing the left click if possible, but if absolutely not I will have to use others sadly. =/
 
This issue is easily resolved with this native:
JASS:
native BlzTriggerRegisterPlayerKeyEvent            takes trigger whichTrigger, player whichPlayer, oskeytype key, integer metaKey, boolean keyDown returns event
instead of:
JASS:
native TriggerRegisterPlayerEvent takes trigger whichTrigger, player  whichPlayer, playerevent whichPlayerEvent returns event
 
This issue is easily resolved with this native:
JASS:
native BlzTriggerRegisterPlayerKeyEvent            takes trigger whichTrigger, player whichPlayer, oskeytype key, integer metaKey, boolean keyDown returns event
instead of:
JASS:
native TriggerRegisterPlayerEvent takes trigger whichTrigger, player  whichPlayer, playerevent whichPlayerEvent returns event
Sorry, little confused. How and where to implement this fix? I'm a gui user mainly. Could just be dumb and this is obvious. xD
 
Sorry, didn't know that.
JASS:
call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName, Player(0), OSKEY_LEFT, 0, true)
This adds an event to when player red presses left arrow key, hence why last argument is true)
JASS:
local integer i = 0
loop
    exitwhen i > 11
    //press
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName, Player(i), OSKEY_LEFT, 0, true)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName, Player(i), OSKEY_RIGHT, 0, true)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName, Player(i), OSKEY_UP, 0, true)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName, Player(i), OSKEY_DOWN, 0, true)
    //release
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName2, Player(i), OSKEY_LEFT, 0, false)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName2, Player(i), OSKEY_RIGHT, 0, false)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName2, Player(i), OSKEY_UP, 0, false)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName2, Player(i), OSKEY_DOWN, 0, false)
    set i = i + 1
endloop

Players' index in JASS start from 0. This should be added from a initialization trigger and added to your respective triggers that deal with pressed and released events.

Perhaps it's time for you to learn even more cool stuff in JASS ;)
 
Sorry, didn't know that.
JASS:
call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName, Player(0), OSKEY_LEFT, 0, true)
This adds an event to when player red presses left arrow key, hence why last argument is true)
JASS:
local integer i = 0
loop
    exitwhen i > 11
    //press
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName, Player(i), OSKEY_LEFT, 0, true)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName, Player(i), OSKEY_RIGHT, 0, true)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName, Player(i), OSKEY_UP, 0, true)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName, Player(i), OSKEY_DOWN, 0, true)
    //release
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName2, Player(i), OSKEY_LEFT, 0, false)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName2, Player(i), OSKEY_RIGHT, 0, false)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName2, Player(i), OSKEY_UP, 0, false)
    call BlzTriggerRegisterPlayerKeyEvent(gg_trg_TriggerName2, Player(i), OSKEY_DOWN, 0, false)
    set i = i + 1
endloop

Players' index in JASS start from 0. This should be added from a initialization trigger and added to your respective triggers that deal with pressed and released events.

Perhaps it's time for you to learn even more cool stuff in JASS ;)
Thank you, but I will be overwhelmed if I do. Already trying to learn coding in unreal engine 4 so I am trying to keep it simpler here. xD Id be overwhelmed. Have issues with remembering all the coding stuff even when I initially tried. Not the best of memory. I am not opposed to learning some here and there. I sprinkle it in a bit, and have a little bit of understanding from attempts at coding before. Thus I can make a tad understanding of the code when I see it, but not enough. xD
 
Status
Not open for further replies.
Back
Top