room_get_camera


Description

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);


Arguments:

Argument Description
rm The index of the room to get the view camera of
vind The index of the view port to get the camera of


Returns:

Real (Camera Index)


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].


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