change cursor image

Maybe someone: i’ve found this post to change the cursor image:

https://blenderartists.org/forum/viewtopic.php?t=30114&highlight=change+mouse

and i have a python script to get the cursor positions, i have in my scene one object with a texture which i want to replace the cursor, but it follows the cursor with some delay so i see the cursor and the object behind it, this is not the way to do this, is it?

Take a look at Andy83’s game Airdale (the one for the Halloween contest). He has a setup that changes the mouse cursor image. Arrow to pumpkin. Umm, wonder if he’ll mind if we use it (the script that is).

Jason Lin

:o :o :o :o :o great game!!!

i’m trying to use the changed cursor image in a walkthrough like the blender.org’s demo. Two problems here:

  1. need the image (the hand or whichever i use instead of the cursor) always to be in front of the camera
  2. I set showMouse(0) but there’s some delay between the real cursor and this other one, so when user clicks something he really isn’t clicking because the cursor is not really there

Andy’s setup should work fine.

Wait a minute are you just talking about having one image or two images for the mouse cursor? If just one just do a search on elysiun on how to change the image for the mouse cursor.

Jason Lin

I’ve since refined my method so it’s easy to include a large number of different cursor images in a game. I’m planning to release an updated version of Airdale shortly with the new refinements (No new content, just refined gameplay).

What conditions do you want the cursor to be replaced under leanny?

Oh and yes you’re free to use my scripts in your games :wink:

:stuck_out_tongue: thanks :expressionless: :expressionless: must say i’ve already tryed
i’m using it in a walkthrough so i need the image always to face the camera, and always the image to be at the same distance from the camera as the user moves along the scene with the camera

:frowning: can the cursor image be changed in a walkthorugh?

Yes it can. When does it need to be changed? Mouse over 1 object? Several objects? On a keypress?

First i just want it to change for ever, i changed it using your script, but i have 2 problems when i walk the scene, because

  1. the image does not always face the camera and
  2. i see a big image when i walk closer
    :expressionless:

Are you using an overlay scene on top of the main scene? My script wasn’t designed to run inside the main scene.

That’s the problem, i need to do something for change the cursor image in a walkthrough like the Walkthrough Demo here:
http://www.blender3d.org/cms/Stand-alones.162.0.html

Is this posible?

It’s possible if you know how to program it in. My script was specific to my game and it can’t just be plugged into another without some modifications (you would need to know some Python).

Do you know how to use overlay scenes?

About the overlay scenes i just know that i need one for the interface, but don’t know why.
I don’t have the slightest idea of how to do this, though i know python and logic bricks and know how to get the mouse xy coordinates.