• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Which variable represents the top corner of what the player can see?

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
 
G

Gamma

Guest
I found the error. I had View[1] active, but I thought xview corresponded with the current view corner :bash:
 
Top