1. The treads can move in 1 of two different ways. The simpler way would be to make them as a separate model and just move the texture via UV coordinates. The harder way would be to actually animate them.
2. To move an object from its location to the point of a mouse click, what I would do is have a trace fired from the mouse to the ground. Then take target, which is modified by c_trace, vec_set it into a vector for your tank to go to and then pathfind to that location.
This untested code has no pathfinding, but should move a tank to a position where the mouse clicks
VECTOR targVec;
int iMouseTraced = 0;
int mouseTrace()
{
VECTOR from;
VECTOR to;
from = vec_for_vertex(mouse_pos,camera);
to.x = mouse_pos.x;
to.y = mouse_pos.y;
to.z = -3000; //somewhere underground
c_trace(from,to,IGNORE_PASSABLE | IGNORE_SPRITES | IGNORE_MODELS);
vec_set(targVec,target);
return(1);
}
action moveTank()
{
VECTOR speed;
my.health = 100;
while(my.health > 0)
{
if(mouse_left)
{
iMouseTraced = mouse_trace();
}
if(iMouseTraced)
{
vec_sub(targVec,my.x);
vec_to_angle(my.pan,targVec);
speed.x = 10 * time_step;
if(vec_dist(my.x,targVec) >= 150)
{
c_move(my,speed,nullvector,IGNORE_PASSABLE | GLIDE);
}
}
wait(1);
}
}
What it does, is in the action, it waits for the LMB to be pressed. When that occurs, mouseTrace is called. In mouse trace, the from vector takes the mouse position and converts it into 3d coordinates. The to vector takes the same coordinates but goes underground. Then I trace from those two vectors and the target will be on the ground somewhere.
Since target is only valid for one frame, I copy its value into the vector targVec. Then I have the function return a 1 so that the tank knows that he has a target destination and moves.
Back in the moveTank() action, if iMouseTraced is 1, then the next two lines make the tank face the target vector, then he moves via c_move so long as he's greater than 150 units from the target (I've done something similar before, you won't get on the vector exactly)
3. Since I'm trying to work on this myself, I do not yet have an answer.