room_set_camera

With this function you can assign 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);

Argument Type Description
rm Room Asset The index of the room to set the view camera of
vind Real The index of the view port to assign the camera to
camera Camera ID The 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].