You can use this function to set the follow target of the view camera within the room. You give the unique camera ID value (as returned by the different camera_create functions) and then give the target instance or object ID that you wish to set the camera view to. Note that if you choose an object ID and there is more than one instance of that object in the room, there is no way for GameMaker Studio 2 to know which instance you wish to follow and so it could be any of them.
Argument Description camera_id The unique camera ID value returned when you created the camera instance_id/object_id Instance or object to have the camera target for following
The above code will set the view camera target for the camera assigned to view port to that of the instance running the code.