Write a camera rule in BASIC
TUTORIAL EDITION / 0.86.4.9
CHANGE A RUNNING GAME
The BASIC function returns the checked action reply. Keep the camera arguments together on one DIM line so the interpreter reads one dictionary.
The camera property selected in the reference
Read/write access and immediate updates
01. Call the function in the workshop
Open Camera-Safety-Workshop.pca3d. Create a BASIC script record, enter the function below and apply. Call checked (Checked in BASIC) while the workshop room is running.
OPTION PCA3D BASIC 1.0
FUNCTION Checked()
DIM args = {"cameraId":"protected","property":"cameraSafety.maxAngle","value":35}
RETURN ActionResult("ChangeCameraProperty", args)
END FUNCTION02. Read the reply
The registered action is ChangeCameraProperty. For this call the reply includes ok = true, result.status = applied and result.effective = 35. An unsuccessful call should be handled before you read the result.
Check your result The protected camera starts with shorten recovery. Try shoulderSearch on a moving shot to see the angle limit affect framing. Reading occlusionState on the active camera gives you its live diagnostics.
BASIC Programming Guide
