G
Gamma
Guest
I have been working with views for zooming in, but for some reason when I set the xy cords to the port, view, exc, they all seem to be set to 0, 0. Why is that? I have the testing in a step event, and zoom is indeed set, and the XY changes, but only once, it doesn't move with the camera like I expected...
Full script:
xgoto = view_xport + 32
ygoto = view_yport + 608
if obj_camera.zoom = 0{
}
if obj_camera.zoom = 1{
xgoto = xgoto / 2
ygoto = ygoto / 2
}
if obj_camera.zoom = 2{
xgoto = xgoto * 2
ygoto = ygoto * 2
}
if obj_camera.zoom = 3{
xgoto = xgoto / 4
ygoto = ygoto / 4
}
if obj_camera.zoom = 4{
xgoto = xgoto * 4
ygoto = ygoto * 4
}
x = xgoto
y = ygoto
Full script:
xgoto = view_xport + 32
ygoto = view_yport + 608
if obj_camera.zoom = 0{
}
if obj_camera.zoom = 1{
xgoto = xgoto / 2
ygoto = ygoto / 2
}
if obj_camera.zoom = 2{
xgoto = xgoto * 2
ygoto = ygoto * 2
}
if obj_camera.zoom = 3{
xgoto = xgoto / 4
ygoto = ygoto / 4
}
if obj_camera.zoom = 4{
xgoto = xgoto * 4
ygoto = ygoto * 4
}
x = xgoto
y = ygoto