[object_type]
friction="100"
id="heart_object"
on_collide="[set(velocity_y, velocity_y/2), set(velocity_x, -velocity_x),animation('flash')]"
on_collide_feet="[set(velocity_y, -velocity_y), set(velocity_x, (velocity_x*9)/10 + (velocity_y*slope_standing_on)/270),animation('flash')]"
on_collide_object_item="if(collide_with.player,if(level.player.driver.hitpoints < level.player.driver.max_hitpoints,
                [set(level.status_gui, 'objects', level.status_gui.objects + [object('heart_object', 20, 20, 1)]), die(), sound('HeartPickUp.ogg'), set(level.player.driver, 'hitpoints', level.player.driver.hitpoints + 1)]))"
on_create="set(vars.time_to_live, level.cycle + vars.time_to_live)"
on_die="map([0]*10, spawn('heart_sparkle_large', level.player.driver.midpoint_x, level.player.driver.y2, 0))"
on_end_anim="animation('normal')"
on_timer="[spawn('heart_sparkle',midpoint_x,midpoint_y,0),if(level.cycle > vars.time_to_live, remove_object(me))]"
solid_dimensions="level_only"
timer_frequency="10"
	[vars]
	time_to_live="5000"
	[/vars]

	[animation]
	accel_y="30"
	duration="2"
	frame_info="0,0,0,0,683,442,15,15,0,0,0,0,698,442,15,15,0,0,0,0,713,442,15,15,0,0,0,0,728,442,15,15,0,0,0,0,743,442,15,15,0,0,0,0,758,442,15,15,0,0,0,0,773,442,15,15,0,0,0,0,788,442,15,15,0,0,0,0,803,442,15,15,0,0,0,0,818,442,15,15,0,0,0,0,833,442,15,15,0,0,0,0,848,442,15,15"
	frames="12"
	frames_per_row="3"
	id="normal"
	image="compiled-2.png"
	item_area="all"
	rect="683,442,697,456"
	solid_area="4,4,8,8"
	[/animation]

	[animation]
	accel_y="20"
	duration="4"
	frame_info="0,0,0,0,604,442,15,15"
	frames="1"
	id="flash"
	image="compiled-2.png"
	item_area="all"
	rect="604,442,618,456"
	solid_area="4,4,8,8"
	[/animation]

[/object_type]

