Hello, at me such question, already 2 hour I can not it is achieved, you don't know as to make that at a touch to object, action was executed, and proceeded will be executed, while I won't depart from it? To mine all variants has checked up... Be so kind as, help laugh


Code:
function man1()
{ 
my.emask |= (ENABLE_IMPACT | ENABLE_PUSH);
set(my,POLYGON);
player = my;
VECTOR temp; var tmp;
camera.clip_near=0.1;
disable_z_glide = 0;
while(1)
{
eat -=time_step/16;  
if (eat > 30)
{
	freeze_mode = 0;
}  
camera.pan-=mouse_force.x*time_step*30;
camera.tilt+=mouse_force.y*time_step*30;
camera.tilt = maxv(-75,minv(camera.tilt,75));
camera.genius=my;
camera.x=my.x - 10; camera.y=my.y; camera.z=my.z+20;
my.pan=camera.pan;

force.x = strength[0]*(key_w-key_s);
force.y = strength[1]*(key_a-key_d);
force.z = strength[2]*(key_space);

vec_set(temp,my.x);
temp.z -= 1000;
my_height = c_trace(my.x,temp,IGNORE_ME|USE_BOX|IGNORE_PASSABLE);

vec_set(my_floornormal,normal);

////////////////////////////////

if(my_height < 5)
{
friction = 0.5;

if(my_floornormal.z < 0.9)
{
force.x *= my_floornormal.z;
force.y *= my_floornormal.z;
absforce.x = my_floornormal.x * gravity * slope;
absforce.y = my_floornormal.y * gravity * slope;
}
}
else
{
friction = 0.03;
force.x *= 0.2;
force.y *= 0.2;
force.z = 0;

absforce.x = 0;
absforce.y = 0;
absforce.z = -gravity;
}


accelerate(dist.x,force.x*time_step,friction);
accelerate(dist.y,force.y*time_step,friction);
accelerate(absdist.z,absforce.z*time_step,friction);






if(my_height < 5)
{
if(my_floornormal.z > slope/4)
{
absdist.z = -maxv(my_height,-10*time_step);
if((my_height + absdist.z) > 6)
{ absdist.z = -my_height -6; }
}

if(force.z > 0)
{
my._JUMPTARGET = jump_height - my_height;
}
}

if(my._JUMPTARGET > 0)
{
my._SPEED_Z = sqrt((my._JUMPTARGET)*2*gravity);
absdist.z = my._SPEED_Z * time_step;
my._JUMPTARGET -= absdist.z;
}

c_move(my,dist,absdist,GLIDE|IGNORE_ME|IGNORE_PASSABLE);

wait(1); }

}


function boom()
{
	if (event_type == EVENT_IMPACT) 
  {
  	wait(1);
ptr_remove(me);
  }
}

action acteat()
{
      my.emask |= EVENT_IMPACT; // lite-C
  my.event = boom;
}