This would be better I think.

Code:

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

///////////////////////////////
//ENTITY* car;


function main()
{
	level_load ("homework18.wmb");
	wait (2);
	//car = ent_create("car1.mdl", vector(0,0,10), NULL);
        ent_create("car1.mdl", vector(0,0,10), my_car);
	while(1)
{
	//camera.x = car.x;
	//camera.y = car.y;
	//camera.z =  car.z +17;
	//camera.tilt = -5;
	wait(1);
}
}

action my_car()
{
	while (1)
	{	
		
		if (key_a)
		{
			my.pan += 3*time_step; // increase the pan angle of the car
			//camera.pan += 3*time_step;
                        camera.pan = my.pan; // does same thing as above but is faster
	}
		if (key_d)
		{
			my.pan -= 3*time_step; // decrease the pan angle of the car
			//camera.pan -= 3*time_step;
                        camera.pan = my.pan; // // does same thing as above but is faster
	}
		if (key_w) // press and hold the "Space" key to move the car
		{
			c_move (my, vector(15*time_step, 0, 0), nullvector, GLIDE);
	}
	   if (key_s)
	   {
	c_move (my, vector(-15*time_step, 0, 0), nullvector, GLIDE);
      }
	
        camera.x = my.x;
	camera.y = my.y;
	camera.z =  my.z +17;
	camera.tilt = -5;

        wait(1);
	}
}


Your 2 main problems however were, 1) you never called the my_car action when you created car with ent_create(), 2) You left wait(1); out of while loop in my_car action.


Professional A8.30
Spoils of War - East Coast Games