This function can be used to set a script that will be called 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 script ID of the script to be called. The order in which scripts attached to cameras and the actual rendering of the camera view is as follows:
- The cameras for all visible and active view ports have their update script called
- Then for each view:
- The begin script for the camera for that view is called
- The draw events are executed for that view
- The end script for the camera is called
- Move to the next active visible view and repeat...
|camera_id||The unique camera ID value returned when you created the camera.|
|script||The script to run each game frame|
The above code sets the update script for the camera assigned to view port .