The following is a mutiliation of a "c_move sample" found in some version of the manual:
(It is also a fine example of what should not be done.)
Code:
#define _feetZ skill28
#define _inputH skill29
#define _inputX skill30
#define _inputY skill31
#define _inputZ skill32

#define _inputPan skill33	
#define _inputTilt skill34
#define _inputRoll skill35

#define _speedX skill36	// nu
#define _speedY skill37	// nu
#define _speedZ skill38

#define _speedPan skill40
#define _speedTilt skill41
#define _speedRoll skill42

#define _bObst	skill50
#define _jmp skill51


// temp vars galore
VECTOR* ph_v1 = {x=0;y=0;z=0;}
ENTITY* ph_eMe0 = NULL;

ANGLE* ph_aForceR = {pan=0;tilt=0;roll=0;}
VECTOR* ph_vForceE = {x=0;y=0;z=0;}
VECTOR* ph_vForceW = {x=0;y=0;z=0;}

VECTOR* ph_vDistE = {x=0;y=0;z=0;}
VECTOR* ph_vDistR = {x=0;y=0;z=0;}
VECTOR* ph_vDistW = {x=0;y=0;z=0;}

var ph_nFrictZ = 0;

VECTOR* cam_v1 = {x=0;y=0;z=0;}

VECTOR* ob_v1 = {x=0;y=0;z=0;}
ANGLE* ob_a1 = {pan=0;tilt=0;roll=0;}
var ob_nTrace = 0;

var e2f_obtWall(ENTITY* _e, var _nAngle, var _nDist) {
	ob_a1.pan = _nAngle;
	ob_a1.tilt = 0;
	ob_a1.roll = 0;
	vec_for_angle(ob_v1, ob_a1);
	vec_normalize(ob_v1, _nDist);
	ob_nTrace = c_trace(_e.x, ob_v1, IGNORE_ME | IGNORE_PASSABLE | IGNORE_PASSENTS | USE_BOX);
	return(trace_hit);
}

void e1f_new(ENTITY* _e) {
	_e.min_z *= 0.5;
	vec_for_min(ph_v1, _e);
	_e._feetZ = ph_v1.z;	
}

void e1f_move(ENTITY* _e) {
	_e._inputX += _e._inputH * _e._inputX;
	_e._inputY += _e._inputH * _e._inputY;
	vec_set(ph_aForceR, nullvector);
	ph_aForceR.pan = _e._inputPan * 5;
	vec_accelerate(ph_vDistR, _e._speedPan, ph_aForceR, 0.5);
	c_rotate(_e, ph_vDistR, IGNORE_PASSABLE | GLIDE);
	vec_set(ph_vDistE, nullvector);
	vec_set(ph_vDistW, nullvector);
	ph_eMe0 = me;
	me = _e;
	my = _e;
	vec_set(ph_v1, _e.x);
	ph_v1.z -= 5000;
	if (c_trace(_e.x, ph_v1, IGNORE_ME | IGNORE_PASSABLE | USE_BOX)) {
		ph_vDistW.z = _e.z + _e._feetZ - target.z;
	} else {
		ph_vDistW.z = 0;
	}
	me = ph_eMe0;
	my = ph_eMe0;
	if (ph_vDistW.z <= 2) {	// on floor?
		_e._jmp = 0;
		if (_e._inputZ) {
			ph_vDistE.z = (_e.max_z - (_e.min_z * 2)) * _e._inputZ;
			_e._jmp = 1;
		}
	}
	ph_nFrictZ = 0.1;		// default friction
	if (_e._jmp != 0) {	// if jumping, add friction
		ph_nFrictZ = 0.9;
	}
	if (ph_vDistW.z > 0) {
		ph_vDistW.z = clamp(ph_vDistW.z, 0, accelerate(_e._speedZ, 5, ph_nFrictZ));
	} else {
		_e._speedZ = 0;
	}
	ph_vDistE.x = 5 * _e._inputX * time_step;
	ph_vDistE.y = 2 * _e._inputY * time_step;
	ph_vDistE.x = sign(ph_vDistE.x) * (abs(ph_vDistE.x) + 0.5 * ph_vDistW.z);
	ph_vDistW.z *= -1;
	ph_eMe0 = me;
	me = _e;
	my = _e;
	c_move(_e, ph_vDistE, ph_vDistW, IGNORE_PASSABLE | GLIDE);
	me = ph_eMe0;
	my = ph_eMe0;
}

// a player action 
// move with wasd or arrow keys
// jump with space or key_ins
// rotate with mouse
// run with scis..shift
action pl1a() {
	e1f_new(me);
	while(me != NULL) {
		my._inputH = key_shift * 2;
		my._inputPan = mouse_force.x * -1;
		my._inputX = (key_w || key_cuu) - (key_s || key_cud);
		my._inputY = (key_a || key_cul) - (key_d || key_cur);
		my._inputZ = (key_space || key_ins);
		e1f_move(me);
		// bullsh!t camera
		vec_for_angle(cam_v1, my.pan);
		vec_normalize(cam_v1, my.min_x * 5);
		vec_add(cam_v1, my.x);
		vec_set(camera.x, cam_v1);
		vec_diff(cam_v1, my.x, camera.x);
		vec_to_angle(camera.pan, cam_v1);
		wait(1);
	}
}

// ENTITY 2 action
// ENTITY turns in circles (and just by chance, turns away from an obstacle every now and again)
action e2a() {
	e1f_new(me);
	while(me != NULL) {
		my._inputPan = 0;
		my._inputX = 1;
		my._bObst = e2f_obtWall(me, 0, my.max_x * 1.5); // trace every frame
		if (my._bObst) {
			my._inputPan = 1;
			my._inputX = 0.25;
		} 
		e1f_move(me);
		wait(1);
	}
}