#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure use_p_proc;

variable ready := 1;

import variable J_Door_Ptr;


procedure start
begin
	if (script_action == spatial_proc) then begin
		if (source_obj == dude_obj) then begin
			if (ready) then begin
				call use_p_proc;
			end
		end
	end
	else begin
		if (script_action == timed_event_proc) then begin
			ready := 1;
		end
	end
end

procedure use_p_proc
begin
	use_obj(J_Door_Ptr);
	add_timer_event(self_obj, game_ticks(4), 1);
end