camera_get_update_script

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.

 

Syntax:

camera_get_update_script(camera_id)

Argument Description
camera_id The unique camera ID value returned when you created the camera

 

Returns:

Script function ID or -1 if no function is assigned

 

Example:

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.