	
	[object_type]
	id=wood_door
	dies_on_inactive=no
	zorder=-1

	[editor_info]
	category=props
		[var]
		name=dest_level
		type=level
		[/var]
		[var]
		name=dest_door
		type=label
		info=dest_level
		[/var]
	[/editor_info]

	on_interact="[if(cycle > 20,sound('DoorOpen.ogg')),animation('open'),fire_event(level.player, 'start_interact')]"
	on_enter="[if(dest_door, teleport(dest_level, dest_door, 'iris'))]"
	on_end_open_anim="animation('ajar')"
	on_end_normal_anim="animation('normal')"
	on_end_ajar_anim="animation('ajar')"
		[animation]
		interact_area=all
		id=normal
		image=props/door.png
		rect=1,1,20,38
		collide_x=0
		collide_y=0
		collide_w=20
		collide_h=38
		pad=1
		frames=1
		duration=10000000
		[/animation]
	
		[animation]
		id=open
		image=props/door.png
		rect=1,1,20,38
		pad=1
		frames=5
		duration=3
		events="14:enter"
		[/animation]

		[animation]
		id=ajar
		image=props/door.png
		rect=85,1,104,38
		collide_x=0
		collide_y=0
		collide_w=20
		collide_h=38
		pad=1
		frames=1
		duration=10000000
		[/animation]

	[/object_type]
