@titan_scale = 20

entity = {
	name = "lithoid_01_titan_entity"
	pdxmesh = "lithoid_01_titan_frame_mesh"
	
	default_state = "idle"
	state = { name = "idle" animation = "idle" 
	
		start_event = { trigger_once = yes sound = { soundeffect = "amb_titan_ship_hum_01" } }
		start_event = { trigger_once = yes sound = { soundeffect = "amb_titan_ship_hum_02" } }
		start_event = { trigger_once = yes sound = { soundeffect = "amb_titan_ship_hum_03" } }
	
	}
	state = { name = "moving" animation = "idle"
		event =  { trigger_once = yes sound = { soundeffect = "moving_out_titan" } }
	}
	state = { name = "death" animation = "death" looping = no 
		event = { time = 2.5 node = "explosion_locator_01" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		event = { time = 3.5 node = "explosion_locator_02" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		event = { time = 5.5 node = "explosion_locator_03" particle = "medium_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		event = { time = 7.5 node = "explosion_locator_04" particle = "medium_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		event = { time = 8.0 node = "explosion_locator_05" particle = "medium_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		event = { time = 9.5 node = "explosion_locator_06" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		event = { time = 9.8 node = "explosion_locator_04" particle = "medium_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		event = { time = 10.5 node = "explosion_locator_03" particle = "medium_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		event = { time = 12.2 node = "explosion_locator_05" particle = "small_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		
		event = { time = 11.23 node = "part1_explosion_locator_1" particle = "medium_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		event = { time = 11.23 node = "part1_explosion_locator_2" particle = "medium_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		event = { time = 11.23 node = "part1_explosion_locator_3" particle = "medium_lithoid_ship_explosion_effect" keep_particle = yes trigger_once = yes }
		event = { time = 19.8 node = "ship_main" particle = "lithoid_ship_explosion_dreadnought" keep_particle = yes trigger_once = yes sound = { soundeffect = "amb_titan_ship_death" } }
	}
	
		
	game_data = {
		size = @titan_scale
		emissive_recolor_crunch = 2.0
	}
	
#	attach = { part1 = "lithoid_01_titan_bow_entity" }
#	attach = { part2 = "lithoid_01_titan_mid_entity" }
#	attach = { part3 = "lithoid_01_titan_stern_entity" }
}

entity = {
	name = "lithoid_01_titan_bow_entity"
	pdxmesh = "lithoid_01_titan_bow_mesh"
	
	locator = { name = "origo"				position = { 0	0  0 } rotation = { 0 0 0 } }
	
	default_state = "idle"
	state = { name = "idle" state_time = 5
		start_event = { node = "light_locator_01" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		start_event = { node = "light_locator_02" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
	}
	state = { name = "moving" state_time = 5
		start_event = { node = "light_locator_01" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		start_event = { node = "light_locator_02" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
	}
	state = { name = "death" state_time = 5 looping = no }
	
	attach = { "origo" = "lithoid_01_titan_weapon_hull_entity"	}
}

entity = {
	name = "lithoid_01_titan_mid_entity"
	pdxmesh = "lithoid_01_titan_mid_mesh"
	
	default_state = "idle"
	state = { name = "idle" state_time = 5
		start_event = { node = "light_locator_03" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		start_event = { node = "light_locator_05" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
	}
	state = { name = "moving" state_time = 5
		start_event = { node = "light_locator_03" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		start_event = { node = "light_locator_05" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
	}
	state = { name = "death" state_time = 5 looping = no }
	attach = { large_gun_01 = "lithoid_01_turret_connection_l_3_entity" }
	attach = { large_gun_02 = "lithoid_01_turret_connection_l_3_entity" }
	attach = { large_gun_03 = "lithoid_01_turret_connection_l_3_entity" }
	attach = { large_gun_04 = "lithoid_01_turret_connection_l_3_entity" }
}

entity = {
	name = "lithoid_01_titan_stern_entity"
	pdxmesh = "lithoid_01_titan_stern_mesh"
	
	default_state = "idle"
	state = { name = "idle" state_time = 5
		start_event = { node = "light_locator_04" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		event = { time = 0 node = "engine_large" particle = "lithoid_4_exhaust_idle" keep_particle = yes trigger_once = yes}		
	}
	state = { name = "moving" state_time = 2
		start_event = { node = "light_locator_04" particle = "lithoid_01_ship_light_effect" keep_particle = yes trigger_once = yes }
		event = { time = 0 node = "engine_large" particle = "lithoid_5_exhaust_moving" keep_particle = yes trigger_once = yes}
		event = { time = 0 node = "engine_large" entity = "lithoid_thruster_lightning_entity" trigger_once = no life = 2}
#		event = { time = 0 node = "engine_large" entity = "lithoid_thruster_sphere_entity" trigger_once = no life = 2}
#		event = { time = 0 node = "engine_large" entity = "lithoid_thruster_sphere_2_entity" trigger_once = no life = 2}
#		event = { time = 0 node = "engine_large" entity = "thruster_curve_2_xl_entity" trigger_once = no life = 2}
	}
	state = { name = "death" state_time = 5 looping = no }
	attach = { large_gun_01 = "lithoid_01_turret_connection_l_3_entity" }
	attach = { large_gun_02 = "lithoid_01_turret_connection_l_3_entity" }
	
	game_data = {
		trail_locators = {
			"exhaust" = 		{ width = @large_trail_W 	lenght = @large_trail_L   	}
		}
	}
}

entity = {
	name = "lithoid_01_titan_weapon_hull_entity"
	pdxmesh = "lithoid_01_titan_weapon_hull"
	scale = 1
	
		game_data = {
		bloom_factor			= 1.2
		uv_animation_speed 		= 0.1
		uv_animation_direction 	= { 0.1 0.55 }
		}
}

# ANIMATIONS

animation = {
	name = "lithoid_01_titan_frame_idle_animation"
	file = "lithoid_01_titan_frame_idle.anim"
}

animation = {
	name = "lithoid_01_titan_frame_death_animation"
	file = "lithoid_01_titan_frame_death.anim"
}