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.


room_get_camera(rm, vind);


参数 描述
rm The index of the room to get the view camera of
vind The index of the view port to get the camera of


Real (Camera Index)


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

上一页: General Room Functions And Variables
下一页: room_exists
© Copyright YoYo Games Ltd. 2018 All Rights Reserved