This function can be used to set a script function that will be called at the beginning of every game frame that the camera is assigned to a visible and active view port. You give the unique camera ID value (as returned by the different camera_create() functions) and the ID of the function to be called. The order in which scripts attached to cameras and the actual rendering of the camera view is as follows:
camera_set_begin_script(camera_id, script)
| Argument | Description |
|---|---|
| camera_id | The unique camera ID value returned when you created the camera. |
| script | The script function to run each game frame |
N/A
camera_set_begin_script(view_camera[0], beginCamera);
The above code sets the begin script function for the camera assigned to view port [0].