room_set_camera


Description

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


Arguments:

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


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