Bulletech
Member
I was recently 'pulling my hair out' trying to figure out why my code for drawing a cursor (without mouse_x and mouse_y) to a camera view wasn't working... and I'm still not sure.
I was using functions like camera_get_view_x(camera_get_active()); as suggested in a YT video I found "Using and Drawing With Views in GameMaker Studio 2 Tutorial" and no matter what I did it wasn't working as expected, even though my debug to see what the function was returning seemed fine.
I then found view_camera[0...7] in the GameMaker Manual and tried camera_get_view_x(view_camera[0]); and so on instead and it worked with no issues. But I'm not sure as to why? I think it might've been an issue with switching between rooms with no cameras/views to a room with a camera/view?
I was using functions like camera_get_view_x(camera_get_active()); as suggested in a YT video I found "Using and Drawing With Views in GameMaker Studio 2 Tutorial" and no matter what I did it wasn't working as expected, even though my debug to see what the function was returning seemed fine.
I then found view_camera[0...7] in the GameMaker Manual and tried camera_get_view_x(view_camera[0]); and so on instead and it worked with no issues. But I'm not sure as to why? I think it might've been an issue with switching between rooms with no cameras/views to a room with a camera/view?