room_set_camera

This function assigns a camera to a specific viewport in a room other than the current one.

You supply the room index, the view index (from 0 to 7) and then the index of the camera to use.

 

Syntax:

room_set_camera(rm, vind, camera);

ArgumentTypeDescription
rmRoom AssetThe room to set the view camera of
vindRealThe index of the view port to assign the camera to
cameraCamera IDThe index of the camera to assign

 

Returns:

N/A

 

Example:

global.myroom = room_add();
room_set_camera(global.myroom, 0, global.MainCam);

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