This function can be used to set the y position of the given view port. You give the view port index (from 0 to 7) and the new position to place it at.
|view_port||The view port to target (0 - 7)|
|y||The new y position|
if view_get_yport(0) != (display_get_height() / 2)
- (view_hport / 2)
view_set_yport(0, (display_get_height() / 2) - (view_hport / 2));
The above code will check the y position of the view port and if it is not where it is required to be it is set to that position.