|camera||The camera index to modify (typically |
|constant||The scaling mode to use (same as config)|
|real||The horizontal position to display the camera within the master view|
|real||The vertical position to display the camera within the master view|
|real||The horizontal area to display the camera within the master view|
|real||The vertical area to display the camera within the master view|
|boolean||Optional: Perform scaling even if a resize was not detected|
While the master view defined in config will always fill the entire window, additional views can be created for splitscreen display within the master view. This script applies the same scaling behaviors to splitscreen views as are applied to the master view.
GameMaker currently provides 8 built-in view cameras, numbered 0-7, although custom cameras can be assigned to the view as well. To use a built-in camera, input
view_visible[#] must be
true for the viewport to be displayed.
Note that if the master view is input in this script, it will be ignored.
It is recommended to use the built-in
view_height macros to position and size the viewport relative to the master view. If this script is run in a Step event, inner views will respond to changes in window size with correct scaling. For other events, enabling the optional
[force] argument will trigger scaling immediately.
By default, base width/height will be determined by the size of the camera when this script is first run. This can be set with
camera_set_view_size or by defining
height_base within a
view# section in config.