Interaction with Mouse only

Talk about making games.

Interaction with Mouse only

Postby ingsan » Wed Jun 02, 2004 2:47 pm

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 :?:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby jazz_e_bob » Wed Jun 02, 2004 8:13 pm

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
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby ingsan » Wed Jun 02, 2004 9:16 pm

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 :?:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby makslane » Fri Jun 04, 2004 1:42 am

May be "Mouse Enter" and "Mouse Leave" events
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby jazz_e_bob » Fri Jun 04, 2004 4:42 am

I approve. 8)
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby ingsan » Fri Jun 04, 2004 9:04 am

Wonderful 8)
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby makslane » Sat Jun 05, 2004 12:04 am

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
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby ingsan » Sat Jun 05, 2004 9:57 am

That's exactly what I'm going to do :wink:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron