Tutorial - Using the Mouse in the GE: Theory

I wrote this tutorial recently, it is fairly in depth and covers how to use the mouse sensors.

Here is an extract from the tutorial:

If you’re serious about making a game or if you’re just making a mini game odds are you’re probably going to need to use the mouse in some sort of way.
In this tutorial I will be covering how to use the mouse sensors; retrieving information from them and then using that information to make certain things happen. Throughout the course of the tutorial we will make 8 blend files that will help you better understand using the mouse in the GE. These blend files are:

  • Making the mouse appear in the GE
  • Returning the mouse cursor co-ordinates (origin at the top right hand corner)
  • Returning the mouse cursor co-ordinates (origin at the centre of the screen)
  • Moving the camera with the mouse
  • Move an object using the mouse
  • Move an object to any spot on the screen instantaneously
  • Move and object to any spot on the screen progressively
  • Make objects spawn where the mouse is clicked and be able to move those objectsBefore reading this tutorial you should have a some what of an understanding of python in the GE.

Keep in mind this tutorial is on the theory on using mouse so don’t say “That camera movement script sucked” because I know it does and thats why I’m writing a follow on to this tutorial ‘Using the Mouse in the GE: Applications’ which will cover making actual systems that use the mouse in the GE.

Anyway, enough jiber jab here’s the link to the tutorial (hosted on my site, look around there if you want:)):
Using the Mouse in the GE: Theory

Hope you learn something new!

Great tutorial. Very helpful. Thanks.

Thanks, this explains things nicely.

Very nice, fun mini game. Well done.

It’s giving me error 500.

Thats weird, can you check again it might have only been at that time.

Yeah, it’s working now.
Awesome tutorial. Well done!!!
This must go sticky :slight_smile:
I didn’t know “&” worked for “and”.
Blendenzo may want this on his site :wink:

Phew, 500 errors are server side errors.

I like to write tutorials because reading tutorials help you to learn, but also writing tutorials helps you to learn as well.

I don’t know about a sticky though, if tutorials were getting sticky’d then the sticky list would get clogged, maybe a thread linking to some tutorials though.

Nice tutorial.

Is there any way to get the camera to move with the cursor in a smoother way? (eg for example 04)
I guess one way to do it is to get the cursor to return to the center of the screen progressively, instead of ‘snapping’ back to 0,0 all the time.

Just a thought!

In my next tutorial I’m planning on doing a better mouse look, but the progressively moving to the middle is a great idea, I will try to implement that. I also have planned to make a click and go system (like in the diablo games) and something else that I have forgotten, I need to check my list.

Nice, they sound like some interesting ideas!

Igsgold offers a series of excellent services for you to enjoy colourful Warhammer life. You can buy unquestionable Cheap Warhammer power leveling from us, a professional, loyal and reliable Warhammer Online powerleveling Gold exchange corporation and power leveling work group. Our professional fellows work hard and strive to make the price of Warhammer Gold lowest, please check War power leveling on every server. Nowhere else can you find such a dirt sale! Available stock of Warhammer Gold all the time, so that we can do a really instant way of delivery. Join us and get your Cheap Warhammer Gold now! You will enjoy our first class service and save more.An American friend has invited you to World of Warcraft cd key visit his family. You’ve never been to an American’s home before, and you’re not sure what to do. Should you take a gift? How should you dress? What time should you buy wow cd key arrive? What should you do when you get there? Glad you asked.