camera_get_begin_script


Description

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


Syntax:

camera_get_begin_script(camera_id)


Arguments:

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


Returns:

Script ID or -1 if no script assigned


Example:

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

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


Back: Cameras
Next: camera_get_end_script
© Copyright YoYo Games Ltd. 2018 All Rights Reserved