ObjectData = 
{
	MotionModel = 
	{
		DefaultAnimation = [[normal]],
		Motions = 
		{
			motion2 = 
			{
				Animations = 
				{
					anim1 = 
					{
						Path = [[DATA:Animations\static light\static_light_toolbar.anim]],
						Name = [[static_light_toolbar]],
						MinFreq = 1.000000,
						MaxFreq = 1.000000,
					},
				},
				Name = [[toolbar]],
			},
			motion1 = 
			{
				Animations = 
				{
					anim6 = 
					{
						Path = [[DATA:Animations\static light\static_light_idle.anim]],
						Name = [[static_light_idle]],
						MinFreq = 1.000000,
						MaxFreq = 1.000000,
					},
					anim4 = 
					{
						Path = [[DATA:Animations\static light\static_light_look_right_left.anim]],
						Name = [[static_light_look_right_left]],
						MinFreq = 100.000000,
						MaxFreq = 120.000000,
					},
					anim5 = 
					{
						Path = [[DATA:Animations\static light\static_light_look_up_down.anim]],
						Name = [[static_light_look_up_down]],
						MinFreq = 70.000000,
						MaxFreq = 100.000000,
					},
					anim1 = 
					{
						Path = [[DATA:Animations\static light\static_light_twirl_eyes_ccw.anim]],
						Name = [[static_light_twirl_eyes_ccw]],
						MinFreq = 120.000000,
						MaxFreq = 140.000000,
					},
					anim3 = 
					{
						Path = [[DATA:Animations\static light\static_light_blink.anim]],
						Name = [[static_light_blink]],
						MinFreq = 4.000000,
						MaxFreq = 8.000000,
					},
					anim2 = 
					{
						Path = [[DATA:Animations\static light\static_light_twirl_eyes_cw.anim]],
						Name = [[static_light_twirl_eyes_cw]],
						MinFreq = 110.000000,
						MaxFreq = 130.000000,
					},
				},
				Name = [[normal]],
			},
		},
	},
	Extensions = 
	{
		PhysicsExtension = 
		{
		},
		LevelEditorExtension = 
		{
		},
		PositionExtension = 
		{
			foreground = false,
			background = true,
		},
		LightingExtension = 
		{
			blue = 200.000000,
			green = 255.000000,
			light_enabled = true,
			red = 255.000000,
		},
	},
}

-- Begin Scripting --

help_text_header = "$00639"
help_text = "$00640"

function OnCreatorUpdate()

	UpdateEffects()
	
end

function UpdateEffects()
	if not front_halo or not front_halo:IsValid() then

		--assert( not back_halo or not back_halo:IsValid() )
		
		current_position = this:GetPosition()

		front_halo = this:CreateEffect( "static light/front_halo" )
		back_halo = this:CreateEffect( "static light/back_halo" )
		
		return
	end
end

function OnInit()	

	this:EnablePhysics( false )	
	
end

function Update()
	Profile_Start("ginseng_static_light")
	
	UpdateEffects()
	
	Profile_Stop("ginseng_static_light")
end

function OnDestroy()
	
end

