Page 1 of 1
GetMouseState() ?? Please Help me!
Posted:
Thu Oct 28, 2010 10:25 pm
by Rufus 01
Hi, I need help and don't know if it possible with GE...
I want to have a action when I klick on a Actor (Mouse Button Down), the problem with it is the following: when I let the Mousekey pressed and moving down from my actor the state doesn't change, I have a Mouse button Up Event, that should get Activated when u moving down from the actor also with pressed down Mousebutton...
I think the Problem is that only when the Mouse Button will pressed down the xmouse & ymouse will be checked...
I hope u all understand what I want to say and u could help me... Thanks
Re: GetMouseState() ?? Please Help me!
Posted:
Thu Oct 28, 2010 11:14 pm
by SirAz
Hmm. I think I know what you mean. If you just use the MOUSEDOWN/MOUSEUP events on your actor, the program only understands that you are unclicking an actor if the cursor is touching. Its like, when you click a button but move the cursor away, then unclick, the button doesn't activate, right? I had the same problem. I had to use filled area actors that correspond to sections of the screen, activating when the mouse enters and then registering clicks. When the mouse unclicks, the main area registers it as a Mousedown = 0 variable, so all of the buttons are deactivated in a script. If you want a full tut I can, but does that help so far?
Re: GetMouseState() ?? Please Help me!
Posted:
Fri Oct 29, 2010 7:54 pm
by Rufus 01
I'm using filled Actor regions, but when u are using this on ipod and using the touchpad and i moving my finger over the screen the xmous & ymouse doesn't changing.
It will only "save", in example xmouse = 50; and when u are moving your finger over the screen the xmouse = 50; will not change....
Re: GetMouseState() ?? Please Help me!
Posted:
Fri Oct 29, 2010 11:09 pm
by skydereign
Not entirely sure what the problem is, but it sounds like you want your mouse button up event to trigger when you are no longer within the actor you initially clicked. That is to say when the mouse leaves the actor. If so the mouse leave event might be what you are looking for.
Re: GetMouseState() ?? Please Help me!
Posted:
Sat Oct 30, 2010 2:19 am
by Rufus 01
What I need is, when The Mouse Button is pressed down and I leef the Actor with the mouse the Mouse button up event need to be activated...
Re: GetMouseState() ?? Please Help me!
Posted:
Sat Oct 30, 2010 2:47 am
by NERDnotGEEK
i think i understand what you mean?
so you mouseup event should also happen if you leave the actor with your mouse?
im not sure but its a guess at what you want
here have a look at this demo and tell me if its what you want rufly
just click on the lower ge face thingy, thats your button
Re: GetMouseState() ?? Please Help me!
Posted:
Sat Oct 30, 2010 2:59 am
by skydereign
Yeah, so what you wanted was the mouse leave event, like in NERDnotGEEK's example.