Help with your scripting

Mouse and FPS

Mouse and FPS

Postby Shando » 30 Apr 2015, 13:51

Hi All,

Is there any way to get the mouse cursor back when using the FPS System?

Basically, I want to be able to release the mouse from the FPS System, so that the player is able to click on a button.

Thanks

Shando
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength http://www.lovehopestrength.co.uk
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer

Re: Mouse and FPS

Postby SolarPortal » 30 Apr 2015, 14:27

there are a few commands you can try:

gui.showCursor(1) -- 1 - true, 0 - false
gui.enableGameInput() -- 1 - true, 0 - false

game.setMouseTrap(1) -- 1 - true, 0 - false
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Mouse and FPS

Postby Shando » 30 Apr 2015, 15:20

Hi SP,

I've sort of got it working :)

Unfortunately, it looks like I now can't get rid of the Mouse Cursor (setting gui.showCursor ( 0 ) doesn't seem to turn it off)??

I've also tried restarting Skyline and reopening the Scene to no avail.

Thanks in advance ;)

Shando
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength http://www.lovehopestrength.co.uk
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer

Re: Mouse and FPS

Postby SolarPortal » 30 Apr 2015, 15:24

use gui.hideCursor()
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer


Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 6 guests

cron