Page 1 of 1

Interaction with Mouse only

PostPosted: Wed Jun 02, 2004 2:47 pm
by ingsan
Hello everyone ! :)

One question : Can we make an Actor interact when Mouse cursor only, ie without any Actor parented to it, is on it ?

The most logical thing to do is to create a MouseActor whose visibility is False, and on Collision with an Actor, an action occurs. But it would be more Practical to be able to DETECT mouse position and collision upon any actor !

Any idea :?:

PostPosted: Wed Jun 02, 2004 8:13 pm
by jazz_e_bob
Your logical idea is the one I use.

Actor - hiddenMouseCollider

This is the animation I use:
http://www.maybanana.com/pantzboi/game_editor/mouse.bmp

Remember, you've got to use an animation with a hole in it so that mouse clicks can "punch through". 8)

jazz

PostPosted: Wed Jun 02, 2004 9:16 pm
by ingsan
Remember, you've got to use an animation with a hole in it so that mouse clicks can "punch through"


Thank you for the tip, Jazz !
That was exactly the problem I get when using a MouseActor ...
Having a hole in the MouseActor image is an excellent idea (at least, it is very helpful) :P

Maxslane, what do you think of having the possibility to have a new Event called onMouseOver that could call an action when Mouse rolls over on an Actor :?:

PostPosted: Fri Jun 04, 2004 1:42 am
by makslane
May be "Mouse Enter" and "Mouse Leave" events

PostPosted: Fri Jun 04, 2004 4:42 am
by jazz_e_bob
I approve. 8)

PostPosted: Fri Jun 04, 2004 9:04 am
by ingsan
Wonderful 8)

PostPosted: Sat Jun 05, 2004 12:04 am
by makslane
You can simulate the Mouse Enter and Mouse Leave events by using the jazz_e_bob tip and catch the Collision and Collision Finish events

PostPosted: Sat Jun 05, 2004 9:57 am
by ingsan
That's exactly what I'm going to do :wink: