#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure map_enter_p_proc;
procedure map_update_p_proc;

import variable Psy_Field_Ptr;


procedure start
begin
	if (script_action == map_enter_proc) then begin
		call map_enter_p_proc;
	end
	else begin
		if (script_action == map_update_proc) then begin
			call map_update_p_proc;
		end
	end
end

procedure map_enter_p_proc
begin
	Psy_Field_Ptr := self_obj;
	if (map_var(6) == 0) then begin
		set_obj_visibility(self_obj, 0);
	end
	else begin
		set_obj_visibility(self_obj, 1);
	end
end

procedure map_update_p_proc
begin
	Psy_Field_Ptr := self_obj;
	if (map_var(6) == 0) then begin
		set_obj_visibility(self_obj, 0);
	end
	else begin
		set_obj_visibility(self_obj, 1);
	end
end