This function gets 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.
room_get_camera(rm, vind);
Argument | Type | Description |
---|---|---|
rm | Room Asset | The room to get the view camera of |
vind | Real | The index of the view port to get the camera of |
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].