Download: N/A Part of official Release
Native Set Type: Single Player or WarSoc
Release: 0.02alpha, updated in 0.10
GetMouseX Gets the X component of the mouse position. GetMouseY Gets the Y component of the mouse position. GetMouseXRelative Gets the X component of the mouse position relative to the window. GetMouseYRelative Gets the Y component of the mouse position relative to the window. SetMouseX Sets the X component of the mouse position. SetMouseY Sets the Y component of the mouse position. SetMousePos Sets the X and Y component of the mouse position, faster if you need to move both at once.
Example usage:
localinteger mx = GetMouseX() localinteger my = GetMouseY() localinteger vx = GetWindowWidth()/2 //GetWindowWidth is part of WindowAPI localinteger vy = GetWindowHeight()/2 //GetWindowHeight is part of WindowAPI
set vx = vx-mx set vy = vy-my //now you can use vx and vy as offset variables to move things. Like a unit. call SetMouseX(GetWindowWidth()/2)//GetWindowWidth is part of WindowAPI call SetMouseY(GetWindowHeight()/2)//GetWindowHeight is part of WindowAPI
Last edited by MindWorX; 03-10-2008 at 06:29 PM..
Reason: New Update
Great, thats all I need to know about MouseAPI.
I'm using it in a first person shooter. The only problem is I can't get the screen to rotate correctly. The custom natives work fine, I'm just not sure how to go about rotating the camera.
If you have any time, check the below post to see what I've tried. Turning camera
__________________
I can help you.......... Maybe...... Give Rep to those that help you!
I'm back! My computers been finished.
Last edited by wd40bomber7; 01-16-2008 at 06:15 AM..
I see that you found a solution to the problem you had. :) Be sure to write once you have a demo of the FPS engine you're doing, would be a great demo to show the possibilities of the MouseAPI.
I think its impossible to play the maps made with it in Bnet
because its impossible to change mause position in default Wc3
so all players will have to have RtC
Wc3 doesnt sync the mause because it would delay AFAIK