K
Kyuraan
Guest
Hi, i wanted to write a function, where the player can use a rifle scope. I tried to do this with a second view, which "stretches" the view_port. And it looks like this:
It works so far, but i wanted the view_xport[1] and view_yport[1] to be set to the mouse x and y coordinates, which doesn't work for some reason. The second view_port just stays in the position, that was set in the room editor, which is in the middle of the display right now.
I tried this:
if view_current == 1{
Well it does move IF i do NOT use the if statement:
if view_current == 1{
}
But then it affects both views and ends up in a total mess on the display. So i have to seperate them, but then it doesn't move at all.
I tried to change the values by increasing by 1 every step or just set a random number for the xport and yport in code. It always stays in the position that was set in the room editor.
Has anyone an idea or can explain why that is?
It works so far, but i wanted the view_xport[1] and view_yport[1] to be set to the mouse x and y coordinates, which doesn't work for some reason. The second view_port just stays in the position, that was set in the room editor, which is in the middle of the display right now.
I tried this:
if view_current == 1{
view_xport[1] = mouse_x
view_yport[1] = mouse_y
}view_yport[1] = mouse_y
Well it does move IF i do NOT use the if statement:
if view_current == 1{
}
But then it affects both views and ends up in a total mess on the display. So i have to seperate them, but then it doesn't move at all.
I tried to change the values by increasing by 1 every step or just set a random number for the xport and yport in code. It always stays in the position that was set in the room editor.
Has anyone an idea or can explain why that is?