room_get_camera

With this function you can get the unique index ID of the camera assigned to a specific view in a room other than the current one. You give the room to use, the view port to use (from 0 to 7) and the function will return a camera index.

 

Syntax:

room_get_camera(rm, vind);

Argument Type Description
rm Room Asset The index of the room to get the view camera of
vind Real The index of the view port to get the camera of

 

Returns:

Camera ID

 

Example:

var cam = room_get_camera(rm_Game, 0);
if cam != global.MainCam
{
    room_set_camera(rm_Game, 0, global.MainCam);
}

The above code assigns a camera in a newly created room to view port [0].