In Lite-C it's something like this:
Code:
ENTITY* myObject;
VIEW* side_view = // the view
{
layer = 30; // above or below others
pos_x = 0; // position of the view
pos_y = 0; // position of the view
size_x = 300; // size of the view
size_y = 300; // size of the view
flags = (TRANSLUCENT | VISIBLE);
}
void TheCamera()
{
while(1)
{
side_view.x = myObject.x-100; // behind the player
side_view.y = myObject.y; // center
side_view.z = 50; // above the player
side_view.alpha = 75; // make view transparent
wait(1);
}
}
void main()
{
level_load("");
wait(1);
myObject = ent_create ("myObject.mdl", vector(-150, 0, 27), NULL); // create the object in our world
TheCamera(); // start the camera and follow myObject
}
Just search in the GameStudio bible for the words VIEW and CAMERA. Also read the
AUM's, George made some security cams in the past.