|
local self = PluginManager():CreatePlugin()
local Mouse = self:GetMouse()
Mouse.Move:connect(function()
print(Mouse.X)
print(Mouse.Y)
end)
I ran this using execute script. I move the mouse. Nothing appears in the output.
Note that there is no error in the output.
How am I supposed to get the mouse's position? X_X
What I'm really wanting to do is to make a plugin that makes a button appear when the mouse is at a certain position on the screen, but if I can't even get the position of the mouse, I'm gonna have problems.. X_X
I want to be able to know the position of the mouse. How am I supposed to do so? |
|
|
Don't tell me I can use a frame or another such way, I know that. I want to use the mouse. I want strictly to know the position of the mouse. Not to use a frame. I want to know the position of the mouse using the mouse itself. |
|
sncplay42Join Date: 2008-11-27 Post Count: 11891 |
You have to activate it. |
|
|
pwnfulJoin Date: 2008-10-03 Post Count: 10505 |
I think you need to make a button for the actual plug-in.
BTW, you might wanna try scripting helpers next time. :) |
|
|
Scripting helpers don't even know how to create a plugin... I would have asked them, otherwise. Sncplay answered my question, it's fine. |
|
|
Well, now, it runs the function, but...
It thinks my mouse is at coordinates 0, 0 everytime I move it...
|
|
OzzypigJoin Date: 2008-03-27 Post Count: 4906 |
@Julien I'm getting that bug too. It's always at 0, 0 even if you move the mouse or unpause the game.
~Ozzy |
|
|
You too? Yay, that means I'm not doing something wrong. I got so annoyed at this bug that I just decided to use a frame, even though I would really have preferred to use the mouse.
It took me a long time to make a simple plugin that does nothing more than showing a button to toggle studio when your cursor is on a certain zone of the screen.. |
|
|
I've been on scripting helpers for ages answering all plugin-related questions T.t |
|
|
Offtopic: @trapping did you fix that encryptor plugin you were making? |
|
|
|
Really, I don't care to much for the new Plugins.
..But for CFraming it seems useful. |
|
OysiJoin Date: 2009-07-06 Post Count: 9058 |
[ Content Deleted ] |
|
|
Oysi have you even err, looked at any other plugins except yours and his?
The wiki articles do and the default plugins and my plugins and (I think) Blocco's plugins and pretty much every plugin made so far does. |
|
bloccoJoin Date: 2008-08-14 Post Count: 29474 |
I do do that
PluginManager's parent is nil so it's a singleton like game trolololol |
|