S
sma
Guest
I have a viewport with the size of 1024x768, and an object with this code.
I don't understand why this doesn't work, as when the instance is created, it's position is not in the center of the viewport
GML:
//CREATE EVENT
menu_x = x;
menu_y = y;
button_h = 60;
// buttons
button[0] = "Stats";
button[1] = "Inventory";
button[2] = "Close";
buttons = array_length_1d(button);
menu_index = 0;
last_selected = 0;
//this is what should define its starting position
x = camera_get_view_x(view_camera[0])+500
y = camera_get_view_y(view_camera[0])+500