well i wouldn't do it with a while loop, that was just to illustrate the basics of a while loop.

I would use an event...

Code:
function health_touched()
{
  if (event_type == EVENT_IMPACT)
  {
    var_health + =5;
    return;
  }
}

action add_this_to_player() 
{
  my.emask |= ENABLE_IMPACT;
  my.event = health_touched;
}


Last edited by DJBMASTER; 08/30/08 11:55.