here you go, it's working for me:

Code:
#include <acknex.h>
#include <default.c>

function playerAct();
function point_mouse();
function move_mouse();

BMAP* arrow = "arrow.bmp";

function main()
{
	video_mode = 8;
	video_screen = 2;
	
	level_load("test.mdl");
	ent_create("soldier.mdl", nullvector, playerAct);
	wait(3);
	
	mouse_mode = 1;
	mouse_map = arrow;
	move_mouse();
}

function move_mouse()
{
	while(1){vec_set(mouse_pos,mouse_cursor); wait(1);}
}


VECTOR temp;
function point_mouse()
{
	
  
   temp.x = mouse_pos.x;
   temp.y = mouse_pos.y;
   temp.z = 5000;
   vec_for_screen(temp,camera);
	c_trace(camera.x,temp.x,IGNORE_ME);
  	if(hit.x != NULL)
  		vec_set(temp.x,hit.x);
  		//wait(1);
}


function playerAct()
{
	camera.z += 200;
	camera.tilt -= 35;
	
	c_setminmax(me);

	VECTOR temp2; vec_zero(temp2);
	ANGLE my_angle; vec_zero(my_angle);
	
	while(1){
		point_mouse();
		if(mouse_left==1){
			while(mouse_left){wait(1);}
			
			vec_set(temp2,temp.x); 
 		 	vec_sub(temp2,my.x);
  			vec_to_angle(my.pan,temp2); // now MY looks at YOU

			my.tilt = 0;
		
			temp2.z = my.z;
		}
		
		if(vec_dist(my.x,temp2)>=40) 
		{
			c_move(me,vector(7*time_step,0,0),nullvector,IGNORE_ME|IGNORE_PASSABLE|GLIDE);
		}
	// else{
			// play stand animation here or something like that
	//	}
			
		wait(1);
	}
}



here's the link for that whole project, if you need it...
http://rapidshare.com/files/240397679/Eagelina.rar.html

try this with your level, with wmb file...

Last edited by cerberi_croman; 06/03/09 15:38.


Ubi bene, ibi Patria.