otterZ
Member
I'm externally loading a sprite from an included file and want the origin set to Middle Centre, but it is drawing with the origin set to Top Left (0,0) ???
Here is the code in the Create Event:
And here is the code in the Draw Event:
I'm no doubt missing something obvious here . . . I set the origin to be middle centre in sprite_add but still stubbornly draws the origin at top left. I've been staring at this for a while now and I can't see what I'm missing. Can you see what I can't see? Thanks for taking the time to read this post.
Here is the code in the Create Event:
GML:
exe = sprite_add(working_directory + "Exercises/spr_resting_strip60.png",60,0,0,sprite_width/2,sprite_height/2); //setting origin to middle centre
x = room_width/2;
y = room_height/2;
GML:
draw_sprite(exe,image_index,x,y);