camera_get_end_script

This function can be used to retrieve the ID of the script function assigned as the end function for the given camera. If no script function is assigned then the function will return -1.

 

Syntax:

camera_get_end_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 funciton is assigned

 

Example:

var scr = camera_get_end_script(camera_view[0]);
if scr != cutScene
    {
    camera_set_update_script(camera_view[0], cutScene);
    }

The above code checks the script function assigned as the begin script for the camera assigned to view port[0] and if it is not "cutScene" it is set to that function.