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

	-- default for this beastie
	actor[cp_actor_name]		= "geopus"
	actor[cp_model_dir]			= "beasties"
	actor[cp_model_name]		= "geopus-1_core"

	actor[cp_move_type]			= cmt_track + cmt_apply_no_dirn + cmt_repelled
	actor[cp_i_collide_with_beasties]	= cat_player + cat_block + cat_blocker

	actor[cp_actor_type]			= cat_geopus
	actor[cp_i_am_repelled_by]		= cat_geopus
--	actor[cp_repel_target]			= "geopus"
	actor[cp_repel_dist]			= 30.0

	actor[cp_score]				= 1000
	actor[cp_hit_power]			= 5.0
	actor[cp_health_percent]		= 110.0
	actor[cp_fade_in_translucent]	= 1

	actor[cp_hit_delay]			= 4.0

	-- movement
	actor[cp_move_speed_min]		= 0.1
	actor[cp_move_speed_max]		= 0.1
	actor[cp_move_acceleration]		= 1.0
	actor[cp_move_deceleration]		= 1.0
	actor[cp_move_inertia_accn]		= 0.99
	actor[cp_move_inertia_decn]		= 0.99

	actor[cp_target_stop_dist]		= 10.0

	actor[cp_turn_lock_angle_inner]		= 85.0
	actor[cp_turn_lock_angle_outer]		= 95.0
	actor[cp_turn_speed_still]			= 13.0
	actor[cp_turn_acceleration_still]	= 10.3
	actor[cp_turn_inertia_still]		= 0.0
	actor[cp_turn_speed_moving]			= 12.0
	actor[cp_turn_acceleration_moving]	= 10.3
	actor[cp_turn_inertia_moving]		= 0.0

	actor[cp_spin_speed_min]		= 0.3
	actor[cp_spin_speed_max]		= 0.3

	actor[cp_difficulty_adjust_speed] = 50.0

	actor[cp_weight]				= 15.0
	actor[cp_fence_bounce_percent]		= 10.0

	actor[cp_launch_hue_shift] = color

--	actor[cp_hit_delay]			= 2.55
--	actor[cp_fade_in_translucent]	= 1
	actor[cp_geopus_style]			= 2

-- leave me
	c_preload_model( actor )
-- leave me
	c_set_random_anim( "moan", 100.0, 100.0, 0.0, 0.0 )
	c_add_sound_to_anim( "moan", "geopus-moan" )
	c_add_sound_to_event( "hit_active_bone", "geopus-corehit" )
	seq = { 0.0 , 0.05, 0.1, 0.2 , 0.4 }
	c_set_use_explosion_for( "bye_bye", "geopus-coreflash", exp_no_align, 100.0, 0.0, 5000.0, 5000.0, seq )
	c_add_sound_to_explosion( "geopus-coreflash", "explode", "geopus-byebye" )
	c_add_particle_to_explosion( "geopus-coreflash", "explode", "", "geopus-coreexp" )
	c_add_particle_to_anim( "emerge", "mainbone", "geopus-emergepad" )

-- tenticle
geopus_tenticle_offset = 7.0

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

	actor[cp_actor_name]		= "tenticle_geopus"
	actor[cp_model_dir]			= "beasties"
	actor[cp_model_name]		= "geopus-1_fins"

	actor[cp_these_collide_with_me]		= cat_player

	actor[cp_score]				= 100
	actor[cp_hit_power]			= 5.0
		actor[cp_hit_delay]			= 4.0

	-- offset from centre
	actor[cp_random_offset_x]			= geopus_tenticle_offset
	actor[cp_launch_hue_shift] = color
	-- movement
	actor[cp_fade_in_translucent]	= 1

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

	c_set_random_anim( "finwibble", 100.0, 200.0, 0.0, 0.0 )
	c_set_random_anim( "fizzle", 100.0, 200.0, 0.0, 0.0 )
--	c_set_use_explosion_for( "bye_bye", "geopus-1_fins", exp_no_align, 30.0, 0.7, 6000.0, 10000.0, {0.0} )
--	c_add_particle_to_explosion( "geopus-1_fins", "explode", "", "geopus-1_fins" )



-- nodule
geopus_nodule_offset = 9.0

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

	actor[cp_actor_name]		= "nodule_geopus"
	actor[cp_model_dir]			= "beasties"
	actor[cp_model_name]		= "geopus-1_segs"

	actor[cp_score]				= 100
	actor[cp_hit_power]			= 5.0
	actor[cp_health_percent]		= 40.0

	actor[cp_hit_delay]			= 4.0

	-- offset from centre
	actor[cp_random_offset_x]			= geopus_nodule_offset
	actor[cp_geopus_style]			= 1

	-- movement
	actor[cp_launch_hue_shift] = color

	actor[cp_fade_in_translucent]	= 1
-- leave me
	c_preload_model( actor )
-- leave me

	c_set_use_explosion_for( "bye_bye", "geopus-1_segs", exp_align, 0.0, 0.0, 100.0, 100.0, {0.0} )
	c_set_use_explosion_for( "bye_bye", "geopus-1_segs_flash", exp_no_align, 0.0, 0.0, 3000.0, 3000.0, {0.0} )
	c_add_sound_to_explosion( "geopus-1_segs", "explode", "geopus-segboom" )
	c_add_sound_to_event( "hit_active_bone", "geopus-seg-hit" )

function geopus_actor_plop( act, tents, posx, posy, posz, rot, siz, hue, path )

	local num_tenticles = tents

	local size = ( num_tenticles * 0.85 / 6.0 ) + 0.15
	siz = 100.0
	size = size * siz

	local unique_name = format( "%s_%d", act, actor_unique_id )

	local apo = ACTOR_PreLaunch( act, unique_name )
	apo:setall( posy, posz, -posx, rot, size, hue, 0.0 )
	apo:launch()

	local dirn_add = ( 180.0 / num_tenticles )
	local dirn_cur = dirn_add

	size = siz

	for i = 1, num_tenticles, 1 do

		act = "nodule_geopus"
		apo = ACTOR_PreLaunch( act )
		posx = sin( -dirn_cur ) * -geopus_nodule_offset
		posy = cos( -dirn_cur ) * -geopus_nodule_offset
		size = siz
--		size = c_zrand(0.85,1.15) * siz
		apo:setall( posx, posy, 0.0, dirn_cur, size, hue, 0.0 )
		apo:launch()
		c_link_to_parent( unique_name, "mainbone", unique_name )
		dirn_cur = dirn_cur + dirn_add

		act = "tenticle_geopus"
		apo = ACTOR_PreLaunch( act )
		posx = sin( -dirn_cur ) * -geopus_tenticle_offset
		posy = cos( -dirn_cur ) * -geopus_tenticle_offset
		size = c_zrand(0.85,1.15) * siz
		apo:setall( posx, posy, 0.0, dirn_cur, size, hue, 0.0 )
		apo:launch()
		c_link_to_parent( unique_name, "mainbone", unique_name )
		dirn_cur = dirn_cur + dirn_add
--		siz = siz * 0.9
	end
end
