entity = {
	name = "lithoid_01_juggernaut_entity"
	pdxmesh = "lithoid_01_juggernaut_frame_mesh"
 
	default_state = "idle"
	state = { name = "idle"	 animation = "idle" animation_blend_time = 0.25
	#	start_event = { trigger_once = yes sound = { soundeffect = "amb_corvette_hum" } }
	}
	state = { name = "moving"	animation = "idle" animation_blend_time = 0.25
	#	event = { trigger_once = yes sound = { soundeffect = moving_out_corvette } }
	}
	state = { name = "death" animation = "death" animation_blend_time = 0.0 looping = no
		event = { time = 13.2 node = "part1" particle = "lithoid_juggernaut_explosion_particle" sound = { soundeffect = ship_destroyed } }
	}
 
    scale = 1.0
	game_data = {
		size = 35
		emissive_recolor_crunch = 5.0
	}

#	attach = { part1 = "lithoid_01_juggernaut_core_section_entity" }
}

entity = {
	name = "lithoid_01_juggernaut_core_section_entity"
	pdxmesh = "lithoid_01_juggernaut_mesh"
	
	default_state = "idle"
	state = { name = "idle" animation = "idle"
		event = { time = 0 node = "engine_large_01" particle = "lithoid_01_juggernaut_exhaust_l_idle" keep_particle = yes trigger_once = yes}		
		event = { time = 0 node = "engine_medium_01" particle = "lithoid_01_juggernaut_exhaust_m_idle" keep_particle = yes trigger_once = yes}		
		event = { time = 0 node = "engine_medium_02" particle = "lithoid_01_juggernaut_exhaust_m_idle" keep_particle = yes trigger_once = yes}		
#		event = { time = 0 node = "engine_small_01" particle = "lithoid_01_juggernaut_exhaust_s_idle" keep_particle = yes trigger_once = yes}		
#		event = { time = 0 node = "engine_small_02" particle = "lithoid_01_juggernaut_exhaust_s_idle" keep_particle = yes trigger_once = yes}		
		
		event = { time = 0 node = "light_locator_01" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		event = { time = 0 node = "light_locator_02" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		event = { time = 0 node = "light_locator_03" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		event = { time = 0 node = "light_locator_04" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		
		event = { trigger_once = yes sound = { soundeffect = juggernaut_lithoid_idle } }
	}
	state = { name = "moving" animation = "idle"
		event = { time = 0 node = "engine_large_01" particle = "lithoid_01_juggernaut_exhaust_l" keep_particle = yes trigger_once = yes}
		event = { time = 0 node = "engine_large_01" entity = "lithoid_01_juggernaut_exhaust_l_entity" trigger_once = no 	life = 4.8 	}
		event = { time = 0 node = "engine_medium_01" particle = "lithoid_01_juggernaut_exhaust_m" keep_particle = yes trigger_once = yes}
		event = { time = 0 node = "engine_medium_02" particle = "lithoid_01_juggernaut_exhaust_m" keep_particle = yes trigger_once = yes}
		event = { time = 0 node = "engine_medium_01" entity = "lithoid_01_juggernaut_exhaust_m_entity" trigger_once = no 	life = 4.8	}
		event = { time = 0 node = "engine_medium_02" entity = "lithoid_01_juggernaut_exhaust_m_entity" trigger_once = no	life = 4.8	}

		event = { sound = { soundeffect = juggernaut_lithoid_move } }
#		event = { time = 0 node = "engine_small_01" particle = "lithoid_01_juggernaut_exhaust_s" keep_particle = yes trigger_once = yes}
#		event = { time = 0 node = "engine_small_02" particle = "lithoid_01_juggernaut_exhaust_s" keep_particle = yes trigger_once = yes}
#		event = { time = 0 node = "engine_small_01" entity = "lithoid_01_juggernaut_exhaust_m_entity" trigger_once = no 	life = 4.8	}
#		event = { time = 0 node = "engine_small_02" entity = "lithoid_01_juggernaut_exhaust_m_entity" trigger_once = no	life = 4.8	}
		
		event = { time = 0 node = "light_locator_01" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		event = { time = 0 node = "light_locator_02" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		event = { time = 0 node = "light_locator_03" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		event = { time = 0 node = "light_locator_04" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
	}
	state = { name = "death" animation = "death" looping = no 
		event = { time = 1.1 node = "explosion_locator_01" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = no }
		event = { time = 1.8 node = "explosion_locator_02" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = no }
		event = { time = 3.1 node = "explosion_locator_03" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = no }
		event = { time = 4.4 node = "explosion_locator_04" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = no }
		event = { time = 4.7 node = "explosion_locator_05" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = no }
		event = { time = 5.2 node = "explosion_locator_06" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = no }
		event = { time = 6.5 node = "explosion_locator_07" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = no }
		event = { time = 6.9 node = "explosion_locator_08" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = no }
	
		event = { time = 3.9 node = "big_explosion_locator_01" particle = "large_2_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = no }
		event = { time = 3.9 node = "big_explosion_locator_01" particle = "juggernaut_burn_effect" keep_particle = yes trigger_once = no }
	}
	attach = { gun_2 = "lithoid_01_turret_connection_l_3_entity" }
	attach = { gun_1 = "lithoid_01_turret_connection_l_3_entity" }
	attach = { gun_3 = "lithoid_01_turret_connection_l_3_entity" }
	attach = { gun_4 = "lithoid_01_turret_connection_l_3_entity" }	
	attach = { gun_5 = "lithoid_01_turret_connection_l_3_entity" }	
	attach = { xl_gun_01 = "lithoid_01_turret_connection_l_3_entity" }	
	attach = { xl_gun_02 = "lithoid_01_turret_connection_l_3_entity" }	
	#game_data = {
	#	trail_locators = {
	#		"engine_large_01" = 		{ width = @large_trail_W 	lenght = @large_trail_L   	}
	#		"engine_large_02" = 		{ width = @large_trail_W 	lenght = @large_trail_L   	}
	#		"engine_large_03" = 		{ width = @large_trail_W 	lenght = @large_trail_L   	}
	#	}
	#}
}

# Engine effects

entity = {
	name = "lithoid_01_juggernaut_exhaust_l_entity"
	
	locator = { name = "core" position = { 0 0 0 } } 
	
	default_state = "moving"
	state = { name = "moving" looping = yes state_time = 1
		event = { time = 0 node = "core" entity = "lithoid_thruster_lightning_entity" trigger_once = no life = 1}
#		event = { time = 0 node = "core" entity = "lithoid_thruster_sphere_entity" trigger_once = no life = 1}
#		event = { time = 0 node = "core" entity = "lithoid_thruster_sphere_2_entity" trigger_once = no life = 1}
#		event = { time = 0 node = "core" entity = "thruster_curve_2_xl_entity" trigger_once = no life = 1}
	}		
		game_data = {
		bloom_factor			= 1.6
		}
	scale = 2
}

entity = {
	name = "lithoid_01_juggernaut_exhaust_m_entity"
	
	locator = { name = "core" position = { 0 0 0 } } 
	
	default_state = "moving"
	state = { name = "moving" looping = yes state_time = 2
		event = { time = 0 node = "core" entity = "lithoid_thruster_lightning_entity" trigger_once = no life = 2}
#		event = { time = 0 node = "core" entity = "lithoid_thruster_sphere_entity" trigger_once = no life = 1}
#		event = { time = 0 node = "core" entity = "lithoid_thruster_sphere_2_entity" trigger_once = no life = 1}
#		event = { time = 0 node = "core" entity = "thruster_curve_2_xl_entity" trigger_once = no life = 2}
	}		

	scale = 1.5
}

# ANIMATIONS

animation = {
	name = "lithoid_01_juggernaut_frame_idle_animation"
	file = "lithoid_01_juggernaut_frame_idle.anim"
}

animation = {
	name = "lithoid_01_juggernaut_frame_death_animation"
	file = "lithoid_01_juggernaut_frame_death.anim"
}

animation = {
	name = "lithoid_01_juggernaut_idle_animation"
	file = "lithoid_01_juggernaut_idle.anim"
}

animation = {
	name = "lithoid_01_juggernaut_death_animation"
	file = "lithoid_01_juggernaut_death.anim"
}
