// fxobj.txt 

// Like a basic talking object, but it also flings projectiles at up to two nearby  locations

// Cell 0 - The talk code to begin the conversation at.
// Cell 1 - The projectile to lob
// Cell 2,3 - The x,y coordinates of the first projectile dest
//   leave at 0 for none
// Cell 4,5 - The x,y coordinates of the second projectile dest
//   leave at 0 for none

beginobjectscript; // talking object

variables;

body;

beginstate INIT_STATE;
	break;

beginstate DEAD_STATE;
	break;
	
beginstate START_STATE; 
	break;

beginstate RUN_ANIM_STATE; 
	if ((get_memory_cell(2) > 0) && (get_ran(1,0,4) == 1))
shoot_projectile(ME,get_memory_cell(2), get_memory_cell(3),get_memory_cell(1));
	if ((get_memory_cell(4) > 0) && (get_ran(1,0,4) == 1))
shoot_projectile(ME,get_memory_cell(4), get_memory_cell(5),get_memory_cell(1));
		
	break;
	
	
beginstate USE_STATE;
	if (get_memory_cell(0) == 0) {
		print_str_color("You can't do anything with this.",2);
		end();
		}

	begin_talk_mode(get_memory_cell(0));
break;


beginstate USE_STATE;


	begin_talk_mode(10);
break;
