I want the mouse cursor to change whenever over any object. Here is the code I have, which lives in Global Script in rep_exec:
Object*o = null;
o = Object.GetAtScreenXY(mouse.x, mouse.y);
if (o != null)
{
Mouse.UseModeGraphic(2);
}
Needless to say, it's currently not working.
Thanks.
You can only access objects like that in a room's script, not in global. Edit: The problem must be something else.
This should work too btw:
if (GetLocationType(mouse.x, mouse.y) == eLocationObject) Mouse.UseModeGraphic(2);
But, as Danvzare stated in your other thread, you don't need to script anything. Just use the cursor's Animate property.
Quote from: Matti on Fri 08/02/2019 11:06:10
You can only access objects like that in a room's script, not in global.
I don't think that's true. To me it looks like some other bug (maybe the program never reaches this point in the code, for example).
You're right Snarky. I just tested it and it worked just fine ;)