generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Is mouse.Idle() an efficient choice?

Previous Thread :: Next Thread 
QJD1996 is not online. QJD1996
Joined: 20 Jan 2009
Total Posts: 1472
27 Oct 2015 02:14 PM
Basically, I have this "Labeler" thing in my game that shows the name of what you're hovering over. Instead of putting it in a loop, I used mouse.Idle() which basically is like a loop.

What do you guys think?
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
27 Oct 2015 02:21 PM
An efficient choice is to detect when the mouse STOPS moving, and then show it until it BEGINS to move again.
Report Abuse
QJD1996 is not online. QJD1996
Joined: 20 Jan 2009
Total Posts: 1472
27 Oct 2015 02:30 PM
Does Roblox have an event for when the mouse stops moving?
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
27 Oct 2015 02:45 PM
"An efficient choice is to detect when the mouse STOPS moving,"

That's exactly what mouse.Idle does
Report Abuse
QJD1996 is not online. QJD1996
Joined: 20 Jan 2009
Total Posts: 1472
27 Oct 2015 02:57 PM
Actually, it doesn't. It may be a glitch or something, but try it. It'll constantly print out values if you test it. Here's an example of what to try

mouse = game.Players.LocalPlayer:GetMouse()

mouse.Idle()
print(mouse.Target)
end

It'll still print stuff even you are moving the mouse.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
27 Oct 2015 04:18 PM
mouse.idle will constantly fire whenever the mouse isn't moving. (Which may occur while moving if you move too slow.)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image