Putting a mouse into BGE?

So, I’m making a game where you aim a gun with the mouse, but whenever I press “P”, the mouse just disapears. How would I make the mouse visible in Blender version 2.49?

Unfortunately you’ll need to use a bit of Python. Create an always sensor with pulse mode off and attach it to a Python controller. Then create a text file and put this in it:


import Rasterizer
Rasterizer.showMouse(True)

And put the name of the text file into the “Script” part of the Python controller.

srry but what do i add the sensor/conroller to? just a normal mesh? And what do you mean by create a text file?

You can add it to anything really, but you’ll probably want it on the character…
To add a text file just open the text editor (select “Text Editor” from the box in the bottom left corner of the button window) and click the little arrows, selecting either “Text” or "ADD NEW’…

I’m a newbie here, I was looking for a way to put a mouse into the BGE and ran across this post. I tried it. but nothing happens. Does Rasterizer have to be in a blender directory? are those cose lines the only code that needs to be present?( I have no coding experience). What do you mean by pulse mode off. I set the pulse mode states to every possible condition still no mouse showed up. Does the actuator have anything to do with it? Thanks for any help.

Forget the last post “true wasn’t capitalized” in my script - newbie error. Found that out when I looked at the python script log. It works great - thanks for the info! Moguri