[object_type]
adjust_feet_on_animation_change="false"
always_active="yes"
has_feet="no"
id="gate_porticullis"
on_create="animation('moving')"
on_end_normal_anim="animation('normal')"
on_lock="[set(is_locked,1),animation('moving')]"
on_process_moving="[
		if(is_locked,
			if(y < vars.desired_y2,
				[set(y, y+(1+gate_vel)),set(vars.gate_vel, vars.gate_vel+1)],
				[animation('normal'),set(vars.gate_vel,2),set(y,origin_y)]),
			if(y > vars.desired_y,
				[set(y, y-(1+gate_vel)),set(vars.gate_vel, vars.gate_vel+1)],
				[animation('normal'),set(vars.gate_vel,2),set(y,origin_y-120)]))]"
on_unlock="[set(is_locked,0),animation('moving')]"
timer_frequency="5"
zorder="-7"
	[vars]
	desired_y="9"
	desired_y2="67"
	gate_vel="2"
	is_locked="0"
	[/vars]

	[animation]
	duration="200"
	frame_info="6,17,16,17,1005,143,16,69"
	frames="1"
	id="normal"
	image="compiled-0.png"
	rect="999,126,1036,228"
	[/animation]

	[animation]
	duration="200"
	frame_info="6,17,16,17,1005,143,16,69"
	frames="1"
	id="moving"
	image="compiled-0.png"
	rect="999,126,1036,228"
	[/animation]

[/object_type]

