IsCameraAttached

From Spheriki

Jump to: navigation, search

Used to check if the camera is attached to a person. Returns true if the camera is attached to anyone, else returns false.


Contents

Usage

function IsCameraAttached();


Examples

if (IsCameraAttached()) DetachCamera();

A condition that checks if the camera is attached. If so: detach the camera.


if (IsCameraAttached())
  Abort("Camera is attached to " + GetCameraPerson());

else
  Abort("Camera is NOT attached to anyone.");

Checks if the camera is attached. If so, abort with the message that the camera is attached to [name of attached person]. Else aborts with saying the camera is not attached.


Abort("Camera attached: " + IsCameraAttached());

Aborts with the message "Camera attached: [true or false]".

Notes


See also

Personal tools