room_get_viewport


Description

With this function you can retrieve the details of a view port in a room other than the current one. You give the room ID and the index of the view port to retrieve (from 0 to 7) and the function will return an array of 5 indices, where:


Syntax:

room_get_viewport(rm, vind);


Arguments:

Argument Description
rm The index of the room to get viewport data from
vind The index of the view port to get


Returns:

Array (5 elements: visible, x, y, width, height)


Example:

v_vals = room_get_viewport(rm_Game, 0);
if v_vals[0] == false
    {
    room_set_view(rm_Game, true, v_vals[1], v_vals[2], v_vals[3], v_vals[4]);
    }

The above code retrieves the view port data for the given room then checks to see if the port is flagged as visible. If it is not, the view port data is set to make it visible.


Back: General Room Functions And Variables
Next: room_set_camera
© Copyright YoYo Games Ltd. 2018 All Rights Reserved