#define health skill100
void test_trace(){
draw_text ("active", 10,10, vector(255,0,0));
var sight = 300; // i can see this far
VECTOR tpos;
vec_for_angle (tpos, vector (my.pan, my.tilt, my.roll));
vec_scale (tpos, sight);
vec_add (tpos, vector (my.x, my.y, my.z));
trace_mode = IGNORE_ME | IGNORE_PASSABLE | USE_BOX | SCAN_TEXTURE | IGNORE_SPRITES;
c_ignore (1, 0);
c_trace (vector (my.x, my.y, my.z), tpos, trace_mode);
if (HIT_TARGET){
if (you) if (ent_bonename (you, NULL, hit.vertex)) draw_text ("Bone handle returned", 10, 20, vector (255,0,0));
draw_point3d (target.x,vector(50,50,255),100,3);
}
}
action hero{
my.health = 100;
my.group = 1;
...
..
.
while (my.health > 0){
test_trace();
...
..
.
wait (1);
}
.
..
...
}