Probably stuck somehow, BTW does your model contain "walk" and/or "scatt" animations?

Edit: try this one, I've edited it a little bit:
Code:
action dusman()
{
	VECTOR temp;
	var scan_result[2];
	var animation_percent[3];
	// wait till player is created!
	while(!player){ wait(1); }
	
	c_setminmax(me);
	while(1)
	{
		// scan for player:
		move_mode = SCAN_ENTS | IGNORE_PASSABLE;
		scan_result[0] = c_scan(my.x, my.pan, vector(150, 0, 1000), move_mode);
		// if found one:
		if(scan_result[0] > 0 && you == player)
		{
			// handle animations:
			move_mode = SCAN_ENTS | IGNORE_PASSABLE;
			scan_result[1] = c_scan(my.x, my.pan, vector(5, 0, 5), move_mode);
			if(scan_result[1] > 1)
			{
				// if near something (I don't really know why you scan again..)
				ent_animate(me, "scatt", animation_percent[0], ANM_CYCLE); // hit
				animation_percent[0] += 2 * time_step; // DON'T FORGET TO USE "time_step" !!
			}
			else{
				// walk here!!
				ent_animate(me, "walk", animation_percent[1], ANM_CYCLE);
				animation_percent[1] += 3.13 * time_step;
			}
			
			// turn to player:
			vec_set(temp, player.x);	
			vec_sub(temp, my.x);
			vec_to_angle(my.pan, temp);
			// don't allow to change TILT (looks weird):
			my.tilt = 0;
			
			// move to target:
			move_mode = IGNORE_PASSABLE | GLIDE;
			c_move(me, vector(14 * time_step, 0, 0),nullvector, move_mode);
		}
		else // if player wasn't found:
		{
			// play stand animation here:
			ent_animate(me, "stand", animation_percent[2], ANM_CYCLE);
			animation_percent[2] += 2 * time_step;
		}
		wait(1);
	}
}

I didn't test it, but it shouldn't crash. Plus, it's better organized! You should always take care of that, to make your script more readable. And you also, should handle such situations, where "player" wasn't found (add). And script should work with multiply bots at the same time, cause of using external variables and vector (better use skills for this). Please, read comments, I hope this will be useful.

Last edited by 3run; 09/16/12 10:58.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung