This function can be used to retrieve the ID of the script function assigned as the update script for the given camera. If no script is assigned then the function will return -1.
camera_get_update_script(camera_id)
| Argument | Description |
|---|---|
| camera_id | The unique camera ID value returned when you created the camera |
Script function ID or -1 if no function is assigned
var scr = camera_get_update_script(camera_view[0]);
if scr != scr_cutscene
{
camera_set_update_script(camera_view[0], scr_cutscene);
}
The above code checks the script function assigned as the update function for the camera assigned to view port[0] and if it is not "cutScene" it is set to that script.