oh deer!
and I don't mean buffalo either. wink

semicolons, brackets and keywords.
and make your ship global too. Or attach a function as the ships mdl function. And perhaps with mini tasks in this attached function for the ship model.

#include <acknex.h>;
#include <default.c>;


function canera_state();
function cam_walking();
var campla =1;

function main()
{
video_screen = 1;
video_mode = 7;
level_load ("place.wmb");
ent_create("ship.mdl", vector(0,0,0),NULL);

while(1)
{
if(campla==1)
{
canera_state();

}
else
{

if(campla == 0)
{ cam_walking(); }




if (key_a){campla=1;}
if (key_b){campla=0;}

wait(1);





}




}




function canera_state()
{
vec_set(camera.x,ship.x);
vec_set(camera.y,ship.y);
vec_set(camera.z,ship.z);// move the camera together with the ship entity
vec_set(camera.pan,ship.pan);
wait(1);


}



function cam_walking()
{

vec_set(camera.x, vector(-300, 0, 20));


}


syntax and form first.
then style and function.
Rhyme and Reason.






Last edited by falagar8; 10/06/08 16:36.