While I can read and write Jass I'm not the best at it and instead prefer to use the bare minimum I have to in Jass and use gui for the rest. The result is what I feel a much more user friendly map for people who use gui and jass. I took the mouse camera system demo made by Brilock and broke it down into the base parts and remade it using only gui with the exception of declaring the frames that the mouse uses to control the camera and it all works as it does in his map with one issue.. The camera is prone to sticking; for example:
1. Player holds down either left or right mouse button
2. Mouse is hidden and then the player is able to move the camera via their mouse as long as it is held down.
3. Player releases mouse and the mouse will reappear and no longer control camera movement.
However sometimes on step three when the player lets go of the mouse button it just keeps controlling the camera as if the game never got the message that the mouse button is no longer held. You can click the mouse button a few times and it will then realize it is no longer beng held and stop contoling the camera. Everything seems to work right with my code but this is not an issue that appears in the demo map by Brilock.
So I have a trigger mouseDown that detects when and which player has issued either a right or left click and it sets the players leftClick or rightClick variable to true. It then moves the mouse to the center of the screen, hides it and enables the custom frames that detect mouse movement for the player. So as long as leftClick or rightClick is true it will move the camera using the mouse. Now when the player lets go of the mouse button it should run mouseUp which is the opposite of the mouseDown trigger. It will set the leftClick or rightClick variable to false and then unhide the mouse and disable the mouse capture frames.
Any ideas? I really want to submit this as a resource for other people to use but I don't want to throw it out there with this bug in it. The map also features a full wads movement system to mimic MMORPG play as faithfully as possible with my ability. My goal was to have a scaleable system that is as easy to use as possible for beginners and veterans alike.
-edit
Oof.. I think my problem lies with the periodic timer event in the trigger "Camera and Movement Timer"
Nope it was one improper condition in the mouse down. I am dumb.
The linked version should be bug free but I've never tested it in Multiplayer.
-- Fixed a bug where you would stutter walk when holding right and left mouse buttons
-- Changed the periodic timer for the "Camera and Movement Timer" trigger from .1 seconds to .2 seconds. Might be able to do .3 seconds but .5 is way too slow to update the players movement.
1. Player holds down either left or right mouse button
2. Mouse is hidden and then the player is able to move the camera via their mouse as long as it is held down.
3. Player releases mouse and the mouse will reappear and no longer control camera movement.
However sometimes on step three when the player lets go of the mouse button it just keeps controlling the camera as if the game never got the message that the mouse button is no longer held. You can click the mouse button a few times and it will then realize it is no longer beng held and stop contoling the camera. Everything seems to work right with my code but this is not an issue that appears in the demo map by Brilock.
So I have a trigger mouseDown that detects when and which player has issued either a right or left click and it sets the players leftClick or rightClick variable to true. It then moves the mouse to the center of the screen, hides it and enables the custom frames that detect mouse movement for the player. So as long as leftClick or rightClick is true it will move the camera using the mouse. Now when the player lets go of the mouse button it should run mouseUp which is the opposite of the mouseDown trigger. It will set the leftClick or rightClick variable to false and then unhide the mouse and disable the mouse capture frames.
Any ideas? I really want to submit this as a resource for other people to use but I don't want to throw it out there with this bug in it. The map also features a full wads movement system to mimic MMORPG play as faithfully as possible with my ability. My goal was to have a scaleable system that is as easy to use as possible for beginners and veterans alike.
-edit
Oof.. I think my problem lies with the periodic timer event in the trigger "Camera and Movement Timer"
Nope it was one improper condition in the mouse down. I am dumb.
The linked version should be bug free but I've never tested it in Multiplayer.
-- Fixed a bug where you would stutter walk when holding right and left mouse buttons
-- Changed the periodic timer for the "Camera and Movement Timer" trigger from .1 seconds to .2 seconds. Might be able to do .3 seconds but .5 is way too slow to update the players movement.
Attachments
Last edited: