#include <define.h>

//#define NAME                    SCRIPT_

#include <command.h>
//#include <ModReact.h>


variable Times;

procedure start;
#include <push.h>


procedure start
begin
	if (script_action == critter_proc) then begin
		if (global_var(GVAR_NECROPOLIS_INVADED) == 0) then begin
			set_obj_visibility(self_obj, 1);
		end
		else begin
			if ((tile_num(self_obj) != 16929) and (Times == 0)) then begin
				Times := 1;
				animate_move_obj_to_tile(self_obj, 16929, ANIMATE_WALK);
				add_timer_event(self_obj, game_ticks(60), 1);
			end
		end
	end
	else begin
		if (script_action == timed_event_proc) then begin
			if (fixed_param == 1) then begin
				animate_move_obj_to_tile(self_obj, 10917, ANIMATE_WALK);
				add_timer_event(self_obj, game_ticks(60), 2);
			end
			else begin
				if (fixed_param == 2) then begin
					animate_move_obj_to_tile(self_obj, 16929, ANIMATE_WALK);
					add_timer_event(self_obj, game_ticks(60), 1);
				end
			end
		end
		else begin
			if (script_action == look_at_proc) then begin
				script_overrides;
				display_msg(message_str(0, 100));
			end
			else begin
				if (script_action == destroy_proc) then begin
					set_global_var(GVAR_SUPER_MUTANTS_KILLED, global_var(GVAR_SUPER_MUTANTS_KILLED) + 1);
				end
			end
		end
	end
end