bullet_name = "bullet-turret1"
dofile_lua( bullet_name )
turret_emerge_actor_name = "turret-smallemerge"
dofile_lua( turret_emerge_actor_name )

-- leave me
	local actor = ACTOR_preload()
-- leave me

	actor[cp_actor_name]		= "turret-1_sma"
	actor[cp_model_dir]			= "beasties"
	actor[cp_model_name]		= "turret-1_sma"

	actor[cp_actor_type]			= cat_block
	actor[cp_these_collide_with_me]	= cat_player + cat_bullet + cat_crystal + cat_webblob + cat_geopus + cat_mergeblob

	actor[cp_health_regain]			= 0.5
	actor[cp_health_percent]		= 100.0
	actor[cp_health_type]			= health_damagable_check_parent

	actor[cp_launch_scale_min]		= 150.0
	actor[cp_launch_scale_max]		= 150.0

	actor[cp_hit_delay]				= 4.0
	actor[cp_mutate_hit_delay]		= 1.0
	actor[cp_hit_power]			= 5.0

	actor[cp_score]				= 250

	actor[cp_launch_hue_shift] = color

-- leave me
	c_preload_model( actor )
-- leave me

	c_set_random_anim( "bulbspin", 75.0, 125.0, 0.0, 0.0 )

--	c_set_random_anim( "throb", 50.0, 150.0, 0.0, 0.0 )
	c_add_particle_to_anim( "mutate", "base", "turret-mutate" )
--	c_add_sound_to_event( "hit_active_bone", "chunk_hit" )
--	c_add_sound_to_anim( "emerge", "chunk_emerge" )
	local seq = { 0.0, 0.1, 0.2, 0.4 }
	c_set_use_explosion_for( "bye_bye", "turret-flash+c", exp_no_align, 0.0, 0.0, 3500.0, 3500.0, {0.0} )
	c_set_use_explosion_for( "bye_bye_damagable", "turret-flash+c", exp_no_align, 0.0, 0.0, 4000.0, 4000.0, {0.0} )
	c_add_particle_to_anim( "emerge", "mainbone01", "turret_emergepad" )
	c_add_particle_to_explosion( "turret-flash+c", "explode", "", "turret-flash" )
	c_add_sound_to_explosion( "turret-flash+c", "explode", "turret-exp" )
	c_add_sound_to_anim( "emerge", "turret-base-emerge" )
	c_add_sound_to_event( "hit_active_bone", "turret-hit" )

	local boo = WEAPON_preload( bullet_name )
	boo[w_gun_bone_name]		= "gun1"
	boo[w_shaft_bone_name]		= "shaftbone"
	boo[w_fire_anim_name]		= "fire"
	boo[w_aim_anim_name]		= "aim"
	boo[w_flare_exp_name]		= "weelee_flare"
	boo[w_flare_exp_scale]		= 2000.0
	boo[w_gun_type]				= "around_only_aim"
	boo[w_aim_delay]			= 1.0
	boo[w_bullet_scale]			= 120.0
	boo[w_barrel_offset]		= 0.0
	boo[w_no_shoot_dist]		= 9.0
	boo[w_no_shoot_angle]		= 0.0
	boo[w_recoil_angle]			= 0.0
	boo[w_recoil_dist]			= 0.0
	boo[w_reload_random]		= 50.0
	local seq = { 2.0, 0.0 }
	WEAPON_add( boo, seq )

