You will want to look into event_type / entity events. Than you have a few options; e.g. letting the blades detect the player through c_scan or c_trace. Best to use c_trace here cause it is more precise here I think.

See this tutorial for c_trace lite-c AUM tutorial.

First get two outer points of the blades where you want that if the player is between the 2 points, it is damaged (e.g. through vec_for_vertex). Than let the c_trace line begin on one end of the blades and let it end on the other side of the blades.

Something like this (I am in a hurry so could be that I missed something or made a mistake);

Code:
action blades ()
{
VECTOR vec_point_bladeleft;
VECTOR vec_point_bladeright;
....
while (1) {
vec_for_vertex(vec_point_bladeleft, my, 1); //check for the right vertex number the model in MED (the yellow dots)
vec_for_vertex(vec_point_bladeright, my, 2); //see above
c_trace (vec_point_bladeleft.x, vec_point_bladeright.x, SCAN_FLAG2); // trace between the blades on the right and on the left of the trap
if (you) {
if (you == player) you.HEALTH -= 2 * time_step;
} 
....
}
....
}



Ps; vec_dist is better if you don't need the trap/blades code to be very precise.



Last edited by Reconnoiter; 01/11/14 14:01.