GML Object fixed on screen position

S

streepje8

Guest
Hey there i want to make my object fixed on screen position i am using views so i need some codeing help
(i have no code yet :(
But i don't know some option too...)
i would like a script for my coin display...
PS: I really did my best to get something but i didn't find something :(
 
Z

Ziphold

Guest
Dont use objects. Use sprites.
Code:
position_x = 32;
position_y = 32;

draw_sprite(spr_coin,0,view_xview+position_x,view_yview+position_y);
 
S

streepje8

Guest
is a object/sprite auto fixed on screen if you use the draw gui event?
 

hogwater

Member
It allows you to draw things relative to the screen, without aligning them to a view or figuring out how to move them with it.
 

CMAllen

Member
It allows you to draw things relative to the screen, without aligning them to a view or figuring out how to move them with it.
Note that while it will *DRAW* to that position on screen, it will still be located wherever it's placed in the room. In the case of GUI things (like buttons) you won't be able to use normal click or mouse_over events. All of that functionality will have to be written by you and handled in the object's step event. So there is some value in being able to orient objects to screen coordinates instead of room coordinates.
 
Top