Move Viewport Coordinates

as the title said, how can we move the viewport? i'm trying using x and y to change the viewport's coordinates but didn't work. same error happens when i use ox and oy, since i read the helpfile the function of ox and oy on viewports only for shaking the viewport itself
You're going to have to provide more information.
where are you changing the ox and oy?
for example, i have this viewport :

@viewport = Viewport.new(0,250,640,44)

now i wanna to move the viewport to the coordinates of x = 100 and y = 300 on the screen. i'm trying to use :

@viewport.x = 100

@viewport.y = 300

but error happens cause viewport doesn't have this function. when i use :

@viewport.ox = 100

@viewport.oy = 300

the viewport only shaking and make the picture inside the viewports were dissappeared

please help 🙁
.ox and .oy should work.


Take a look at Scene_Battle.move_info_viewport to see how the party and actor command windows are moved around.
I tried moving viewport in battle using ox and oy and it works for me... 
If it's shaking, it sounds like there's already something that's changing those values on each frame. Maybe a more complete script would help, because the code you've got there SHOULD work, IF there's nothing else interfering with it.
sorry to bother you all, i've fixed this myself 😀

there were many pictures inside of my viewports so when i moved the viewport i didn't update the pictures so the pictures stay on it while the viewports moves 😀 and also my bad the viewport was to small to view all the pictures 😀

again, i've fixed this myself this thread can be closed 😀
You shouldn't have to do anything with the pictures - if the viewport moves, the pictures should move with it (assuming they were allocated to that viewport).


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/move-viewport-coordinates.19466/