Every time you hear the beep you also RESET my.NODE_NEXT back to 4 even though the function ran past 4 and has set it to 3 ...

Will do a lock/check with a new var.

Code:
action monster_action() 
{
var set_once =0; // Attention <-NEW VAR
   ...

   pathSetNum = 1;

   ...
	
   while (1)
   { 
      ...
	   
      if(my.STATE == 1) 
      {	
         my.ANIMATION += 3*time_step;
			
         ent_animate(me,"idle",my.ANIMATION,ANM_CYCLE);	
		
         c_scan(my.x,my.pan,vector(360,0,750),SCAN_ENTS | SCAN_FLAG2 | 
            IGNORE_ME);
			
	 if (you) // player detected?
	 {  
	    path_setter(); // MONSTER RUNS DOWN path_001 SINCE pathSetNum = 1
					
	    ...

	    my.STATE = 2; 
	    
            ...
	 }				
      }
	
      // state 2: turn towards enemy, cast spells /////////////////// 
      if (my.STATE == 2) 
      {				
         if((hero.z > 50) && (hero.z > my.z)) // IF PLAYER IS HIGHER THAN 
                                              //    MONSTER ON STAIRS
	 {
	    pathSetNum = 2;
		if(!set_once)
           {		
	    my.NODE_NEXT = 4;
            set_once=1;
           }
	 }

         if((my.z >= 47) && (my.z <= 49))
	 {
	    vec_set(temp.x, player.x);
            vec_sub(temp.x, my.x);
            vec_to_angle(my.pan, temp); // rotate the enemy towards the player
	 }
			
         c_move(my, vector(8 * time_step, 0, 0), nullvector, GLIDE);
         
         ent_animate(my, "run", anim_percentage, ANM_CYCLE);
         anim_percentage += 8 * time_step;

         ...
      }  
		
      ...
		
      wait(1);
   }
}