(solved) Code help! please

G

Guybrush threepwood

Guest
I have a question, i want to make a custom cursor and i want to know the best way to make one.
the: x = mouse_x
y = mouse_y this makes me feel like all "x's" will be be on mouse_x for example;
if i'm drawing a sprite at x+3 would that mean 3+ the origin of the sprite or the mouse?
(same with y)
and the: mouse_sprite()
is it harder to make an animated cursor with this? for example i want to make an still cursor but when it hovers
over an object it will start rotating etc. in other words would this command be surrendering control
when i don't need to?

any better ways?
 
D

Dave M

Guest
Mouse Object:

step:
Code:
x=mouse_x
y=mouse_y
var hoverobject, myimage;
hoverobject=

if collision_rectangle(x-sprite_width,y-sprite_height,x+sprite_width,y+sprite_height,hoverobject, 1, 1 );
{
myimage=spr_animatedmouse
}
else
{
myimage=spr_mouse
}
draw:
Code:
draw_sprite(myimage,-1,x,y)
something like this?
 
Top