[object_type]
	[vars]
		points_value="0"
		damage=100
		
		mass=200
	[/vars]
	hitpoints=3
	id=minecart_large_playable
	zorder=-1
	object_level_collisions=yes
	solid_area=0,0,81,54
	
	on_create="set(tmp.cld, 1)"
	
	on_process="[
		# Set according to slope (may need tweaking) and kill velocity if underwater. #
		set(velocity_x, 
			(((velocity_x + (slope_standing_on / 1)) * 997) / 1000) 
			- (underwater * (velocity_x*999/1000))
			+ (is_standing * ctrl_left * (((velocity_x > -300) * 15) + 6))
			- (is_standing * ctrl_right * (((velocity_x < 300) * 15) + 6))
			+ (is_standing * ctrl_down * (velocity_x < 0) * 35)
			- (is_standing * ctrl_down * (velocity_x > 0) * 35)),
		set(velocity_y, ((velocity_y * 997) / 1000)
		    + (underwater * (((velocity_y * 9) / 10)))
			+ (is_standing * ctrl_jump * (0-1000))),
		if (is_standing, set(rotate, (slope_standing_on+rotate)/2)),
		if ((velocity_x > 500 or velocity_x< -500) and ctrl_down and is_standing, [map([0] * 1d10, spawn('spark', x + 110 + (1d3), y + 95 + (1d3), facing))]),
			set(level.lock_screen, [x+(velocity_x/(100/29)),y+(velocity_y/(100/10))])
		]"
	
	on_collide="[
	set(velocity_x, velocity_x/2), set(velocity_y, velocity_y/2)]"
	
	on_enter_water="[
		add_wave(midpoint_x, y2, -2000, 5*velocity_y/2, 30*velocity_y, 300, 300),
		add_wave(midpoint_x, y2, 2000, 5*velocity_y/2, 30*velocity_y, 300, 300),
		add_wave(midpoint_x, y2, -1000, 3*velocity_y/2, 20*velocity_y, 200, 200),
		add_wave(midpoint_x, y2, 1000, 3*velocity_y/2, 20*velocity_y, 200, 200),
		add_wave(midpoint_x, y2, -500, 2*velocity_y/2, 10*velocity_y, 100, 100),
		add_wave(midpoint_x, y2, 500, 2*velocity_y/2, 10*velocity_y, 100, 100)
	]"
	
	[animation]
		id=normal
		image=characters/minecart_large.png
		rect=0,0,81,54
		collide=0,0,81,54
		body_area=all	
		attack_area=-1,-1,82,155
		accel_y=70
	[/animation]
	
	[solid]
		rect=0,0,81,54
		id=body
	[/solid]
[/object_type]
