Scripts / Disable Mouse Look?

Author
Message
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 16th Jul 2017 01:29
Is it possible to disable the mouse look?

I'm looking to play around with the concept of having it so that only when you click and hold the right mouse button, you can look around with the mouse. That way I can keep a mouse cursor on screen at all times, for UI interactions.

Noticed there are some commands for the mouse but I'm unsure of how to use them. Not sure what aspects might be hardcoded?
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GT 740
MrEaKing(YT)
7
Years of Service
User Offline
Joined: 9th Mar 2017
Location: Ontario
Posted: 16th Jul 2017 03:34 Edited at: 16th Jul 2017 03:44
wow i feel dumb so this should do it

I originally tried to move the camera then got thinking if you are looking then you don't need the cursor so if rightclick = true then deactivate the mouse if click or no click or middle click then mouse active lol hope that works out.

edit-- i figure you know how do sprites for your cursor. But if not change the LoadImage("scriptbank\\menu\\cursor.png") to where your cursor image is or make a folder in scriptbank named menu then save a cursor.png file of what you want your cursor to look like inside the folder lol
Youtube.com/MrEaKing

ELC - Explore, Learn and Create.

Desktop - HomeBuilt- Win 7 - AMD-FX 8300 Eight Core 3.30 Ghz
12 GB RAM
GeForce GTX 1050 Ti 4GB
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 16th Jul 2017 03:50 Edited at: 16th Jul 2017 04:02
Wow that works quite well. Thanks a lot! Not sure how you were able to whip that up so quick. Im now able to have the FPS controls and use the mouse for interacting with a UI in real-time. This is actually making my dungeon crawler project actually possible.

Also didn't realize it was this easy to disable the mouse "DeactivateMouse()"

Quote: "edit-- i figure you know how do sprites for your cursor. But if not change the LoadImage("scriptbank\\menu\\cursor.png") to where your cursor image is or make a folder in scriptbank named menu then save a cursor.png file of what you want your cursor to look like inside the folder lol"


Oh no worries got the cursor bit working no problem. Will be creating a much better one in the future; since the current one im using is absolutely massive on screen lol
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GT 740

Login to post a reply

Server time is: 2024-12-23 00:36:37
Your offset time is: 2024-12-23 00:36:37