
isBridge = {}
function wind_turbine_init(e)
        SetAnimation(0)
		LoopAnimation(e)
	isBridge[e] = e
	SetActivated(e,1)
	CollisionOn(e)
end

function wind_turbine_main(e)
		
	--this script does nothing until the bridge is set to activated state 98
	--then it will animate and destroy itself
	if g_Entity[e]['activated'] == 98 then 
	    StopAnimation(e)
		SetAnimation(1)
		PlayAnimation(e)
		--CollisionOff(e)
				g_Entity[e]['animating'] = 1
		SetActivated(e,99)
	elseif g_Entity[e]['activated'] == 99 then 
		if g_Entity[e]['animating'] == 0 then 
		--CollisionOn(e)
			--Destroy(e)
		end
	end
end 