//--- OBJECT WRITE BEGIN --- new SimGroup(MissionGroup) { canSaveDynamicFields = "1"; new ScriptObject(MissionInfo) { name = "Racing Example"; type = "racing"; desc0 = "This is a very simple racing example mission which illustrates the wheeled vehicle physics included in the engine. Mission lighting only occurs the first time the mission is loaded."; }; new MissionArea(MissionArea) { canSaveDynamicFields = "1"; Area = "-1024 -1024 2048 2048"; flightCeiling = "300"; flightCeilingRange = "20"; locked = "true"; }; new SimGroup(environment) { canSaveDynamicFields = "1"; new Sky(Sky) { canSaveDynamicFields = "1"; position = "336 136 0"; rotation = "1 0 0 0"; scale = "1 1 1"; materialList = "~/data/skies/sky_sunset1.dml"; cloudHeightPer[0] = "0.1"; cloudHeightPer[1] = "0.1"; cloudHeightPer[2] = "0.1"; cloudSpeed1 = "0.0005"; cloudSpeed2 = "0.0005"; cloudSpeed3 = "0.0005"; visibleDistance = "1000"; fogDistance = "300"; fogColor = "1 0.8 0.7 1"; fogStorm1 = "0"; fogStorm2 = "0"; fogStorm3 = "0"; fogVolume1 = "0 0 0"; fogVolume2 = "0 0 0"; fogVolume3 = "0 0 0"; fogVolumeColor1 = "128 128 128 -2.22768e+038"; fogVolumeColor2 = "128 128 128 0"; fogVolumeColor3 = "128 128 128 -1.70699e+038"; windVelocity = "1 1 0"; windEffectPrecipitation = "1"; SkySolidColor = "0.6 0.6 0.6 1"; useSkyTextures = "1"; renderBottomTexture = "0"; noRenderBans = "0"; }; new Sun() { canSaveDynamicFields = "1"; azimuth = "50"; elevation = "30"; color = "0.6 0.5 0.45 1"; ambient = "0.4 0.3 0.3 1"; CastsShadows = "1"; scale = "1 1 1"; direction = "0.57735 0.57735 -0.57735"; position = "0 0 0"; rotation = "1 0 0 0"; }; new fxSunLight(sunflare1) { canSaveDynamicFields = "1"; position = "98.5277 -289.053 188.13"; rotation = "1 0 0 0"; scale = "1 1 1"; Enable = "1"; LocalFlareBitmap = "common/lighting/corona"; RemoteFlareBitmap = "common/lighting/corona"; SunAzimuth = "224"; SunElevation = "10"; LockToRealSun = "1"; FlareTP = "1"; Colour = "0.3 0.2 0 1"; Brightness = "0.1"; FlareSize = "2"; FadeTime = "0.1"; BlendMode = "0"; AnimColour = "0"; AnimBrightness = "1"; AnimRotation = "1"; AnimSize = "0"; AnimAzimuth = "0"; AnimElevation = "0"; LerpColour = "1"; LerpBrightness = "1"; LerpRotation = "1"; LerpSize = "1"; LerpAzimuth = "1"; LerpElevation = "1"; LinkFlareSize = "0"; SingleColourKeys = "1"; MinColour = "0 0 0 1"; MaxColour = "1 1 1 1"; MinBrightness = "0.7"; MaxBrightness = "1"; MinRotation = "0"; MaxRotation = "359"; minSize = "1"; MaxSize = "1"; MinAzimuth = "0"; MaxAzimuth = "359"; MinElevation = "-30"; MaxElevation = "210"; RedKeys = "AZA"; GreenKeys = "AZA"; BlueKeys = "AZA"; BrightnessKeys = "JAZJTAJ"; RotationKeys = "ZA"; SizeKeys = "ATAZA"; AzimuthKeys = "AZ"; ElevationKeys = "AZ"; ColourTime = "5"; BrightnessTime = "10"; RotationTime = "40"; SizeTime = "30"; AzimuthTime = "5"; ElevationTime = "5"; }; new fxSunLight(sunflare2) { canSaveDynamicFields = "1"; position = "72.9234 -289.051 187.692"; rotation = "1 0 0 0"; scale = "1 1 1"; Enable = "1"; LocalFlareBitmap = "common/lighting/corona"; RemoteFlareBitmap = "common/lighting/corona"; SunAzimuth = "224"; SunElevation = "10"; LockToRealSun = "1"; FlareTP = "1"; Colour = "0.3 0.2 0.1 1"; Brightness = "0.6"; FlareSize = "0.6"; FadeTime = "0.1"; BlendMode = "0"; AnimColour = "0"; AnimBrightness = "0"; AnimRotation = "1"; AnimSize = "0"; AnimAzimuth = "0"; AnimElevation = "0"; LerpColour = "1"; LerpBrightness = "1"; LerpRotation = "1"; LerpSize = "1"; LerpAzimuth = "1"; LerpElevation = "1"; LinkFlareSize = "0"; SingleColourKeys = "1"; MinColour = "0 0 0 1"; MaxColour = "1 1 1 1"; MinBrightness = "0.25"; MaxBrightness = "0.5"; MinRotation = "0"; MaxRotation = "359"; minSize = "3"; MaxSize = "3"; MinAzimuth = "0"; MaxAzimuth = "359"; MinElevation = "-30"; MaxElevation = "210"; RedKeys = "AZA"; GreenKeys = "AZA"; BlueKeys = "AZA"; BrightnessKeys = "AZJTA"; RotationKeys = "AZ"; SizeKeys = "ATAZA"; AzimuthKeys = "AZ"; ElevationKeys = "AZ"; ColourTime = "5"; BrightnessTime = "6"; RotationTime = "80"; SizeTime = "5"; AzimuthTime = "5"; ElevationTime = "5"; }; new TerrainBlock(Terrain) { canSaveDynamicFields = "1"; rotation = "1 0 0 0"; scale = "1 1 1"; detailTexture = "~/data/terrains/details/detail1"; terrainFile = "./racing.ter"; squareSize = "8"; bumpScale = "1"; bumpOffset = "0.01"; zeroBumpScale = "8"; tile = "1"; locked = "true"; position = "-1024 -1024 0"; }; new fxFoliageReplicator(ShortGrass3) { canSaveDynamicFields = "1"; position = "-204.949 986.166 199.214"; rotation = "1 0 0 0"; scale = "1 1 1"; UseDebugInfo = "0"; DebugBoxHeight = "1"; HideFoliage = "0"; ShowPlacementArea = "0"; PlacementAreaHeight = "25"; PlacementColour = "0.4 0 0.8 1"; Seed = "1376312589"; FoliageFile = "~/data/shapes/plants/plant2"; FoliageCount = "1000"; FoliageRetries = "100"; InnerRadiusX = "0"; InnerRadiusY = "0"; OuterRadiusX = "30"; OuterRadiusY = "40"; MinWidth = "0.5"; MaxWidth = "3"; MinHeight = "1"; MaxHeight = "3"; FixAspectRatio = "1"; FixSizeToMax = "0"; OffsetZ = "0"; RandomFlip = "1"; UseCulling = "1"; CullResolution = "10"; ViewDistance = "120"; ViewClosest = "1"; FadeInRegion = "40"; FadeOutRegion = "1"; AlphaCutoff = "0.1"; GroundAlpha = "1"; SwayOn = "1"; SwaySync = "0"; SwayMagSide = "0.01"; SwayMagFront = "0.03"; MinSwayTime = "5"; MaxSwayTime = "10"; LightOn = "1"; LightSync = "0"; MinLuminance = "0.7"; MaxLuminance = "1"; LightTime = "5"; AllowOnTerrain = "1"; AllowOnInteriors = "0"; AllowOnStatics = "0"; AllowOnWater = "0"; AllowWaterSurface = "0"; AllowedTerrainSlope = "90"; }; new fxFoliageReplicator(ShortGrass2) { canSaveDynamicFields = "1"; position = "-178.909 470.781 156.266"; rotation = "1 0 0 0"; scale = "1 1 1"; UseDebugInfo = "0"; DebugBoxHeight = "1"; HideFoliage = "0"; ShowPlacementArea = "0"; PlacementAreaHeight = "25"; PlacementColour = "0.4 0 0.8 1"; Seed = "1376312589"; FoliageFile = "~/data/shapes/plants/plant2"; FoliageCount = "1000"; FoliageRetries = "100"; InnerRadiusX = "0"; InnerRadiusY = "0"; OuterRadiusX = "30"; OuterRadiusY = "70"; MinWidth = "0.5"; MaxWidth = "3"; MinHeight = "1"; MaxHeight = "3"; FixAspectRatio = "1"; FixSizeToMax = "0"; OffsetZ = "0"; RandomFlip = "1"; UseCulling = "1"; CullResolution = "10"; ViewDistance = "120"; ViewClosest = "1"; FadeInRegion = "40"; FadeOutRegion = "1"; AlphaCutoff = "0.1"; GroundAlpha = "1"; SwayOn = "1"; SwaySync = "0"; SwayMagSide = "0.01"; SwayMagFront = "0.03"; MinSwayTime = "5"; MaxSwayTime = "10"; LightOn = "1"; LightSync = "0"; MinLuminance = "0.7"; MaxLuminance = "1"; LightTime = "5"; AllowOnTerrain = "1"; AllowOnInteriors = "0"; AllowOnStatics = "0"; AllowOnWater = "0"; AllowWaterSurface = "0"; AllowedTerrainSlope = "90"; }; new fxFoliageReplicator(ShortGrass) { canSaveDynamicFields = "1"; position = "-386.947 796.221 154.184"; rotation = "1 0 0 0"; scale = "1 1 1"; UseDebugInfo = "0"; DebugBoxHeight = "1"; HideFoliage = "0"; ShowPlacementArea = "0"; PlacementAreaHeight = "25"; PlacementColour = "0.4 0 0.8 1"; Seed = "1376312589"; FoliageFile = "~/data/shapes/plants/plant2"; FoliageCount = "1000"; FoliageRetries = "100"; InnerRadiusX = "0"; InnerRadiusY = "0"; OuterRadiusX = "30"; OuterRadiusY = "40"; MinWidth = "0.5"; MaxWidth = "3"; MinHeight = "1"; MaxHeight = "3"; FixAspectRatio = "1"; FixSizeToMax = "0"; OffsetZ = "0"; RandomFlip = "1"; UseCulling = "1"; CullResolution = "10"; ViewDistance = "120"; ViewClosest = "1"; FadeInRegion = "40"; FadeOutRegion = "1"; AlphaCutoff = "0.1"; GroundAlpha = "1"; SwayOn = "1"; SwaySync = "0"; SwayMagSide = "0.01"; SwayMagFront = "0.03"; MinSwayTime = "5"; MaxSwayTime = "10"; LightOn = "1"; LightSync = "0"; MinLuminance = "0.7"; MaxLuminance = "1"; LightTime = "5"; AllowOnTerrain = "1"; AllowOnInteriors = "0"; AllowOnStatics = "0"; AllowOnWater = "0"; AllowWaterSurface = "0"; AllowedTerrainSlope = "90"; }; }; new SimGroup(PlayerDropPoints) { canSaveDynamicFields = "1"; new SpawnSphere() { canSaveDynamicFields = "1"; position = "-173.824 910.624 196.718"; rotation = "0 0 -1 2.47371"; scale = "1 1 1"; dataBlock = "SpawnSphereMarker"; Radius = "1"; sphereWeight = "100"; indoorWeight = "100"; outdoorWeight = "100"; homingCount = "0"; locked = "false"; lockCount = "0"; }; new SpawnSphere() { canSaveDynamicFields = "1"; position = "-160.802 910.516 196.262"; rotation = "0 0 -1 2.47371"; scale = "1 1 1"; dataBlock = "SpawnSphereMarker"; Radius = "1"; sphereWeight = "100"; indoorWeight = "100"; outdoorWeight = "100"; homingCount = "0"; locked = "false"; lockCount = "0"; }; new SpawnSphere() { canSaveDynamicFields = "1"; position = "-148.168 911.136 194.677"; rotation = "0 0 -1 10.4951"; scale = "1 1 1"; dataBlock = "SpawnSphereMarker"; Radius = "1"; sphereWeight = "100"; indoorWeight = "100"; outdoorWeight = "100"; homingCount = "0"; locked = "false"; lockCount = "0"; }; }; new SimGroup(Buildings) { canSaveDynamicFields = "1"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-131.795 917.09 192.98"; rotation = "0 0 -1 8.02137"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/barrier1.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-132.712 882.821 193.112"; rotation = "0 0 1 9.74035"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/barrier1.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-210.068 1114.36 158.395"; rotation = "0 0 -1 112.873"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/barrier1.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-333.846 848.488 154.841"; rotation = "-0.152803 -0.142578 0.977918 95.2405"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/wedge.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-213.138 568.133 147.487"; rotation = "0.116233 -0.109843 -0.987129 86.6763"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/wedge.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-357.272 497.436 164.997"; rotation = "0 0 1 112.873"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/arrowsign.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-220.044 476.387 155.583"; rotation = "0 0 1 20.0538"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/arrowsign.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-156.644 1104.9 170.703"; rotation = "0 0 -1 90.527"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/arrowsign.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-246.636 1089.27 162.629"; rotation = "0 0 1 204.156"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/arrowsign.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-221.443 830.139 202.262"; rotation = "0 0 1 20.0538"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/arrowsign.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-347.691 751.557 149.026"; rotation = "1 0 0 0"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/block1.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-325.396 710.21 151.1"; rotation = "1 0 0 0"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/block1.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-182.116 836.796 193.984"; rotation = "1 0 0 0"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/block1.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-204.327 811.909 189.803"; rotation = "1 0 0 0"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/block1.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-197.236 503.298 149.057"; rotation = "0 0 1 6.87505"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/barrier1.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-176.757 788.581 192.967"; rotation = "1 0 0 0"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/block1.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new InteriorInstance() { canSaveDynamicFields = "1"; position = "-342.687 926.283 158.366"; rotation = "0 0 1 189.832"; scale = "1 1 1"; interiorFile = "~/data/interiors/racing/arrowsign.dif"; useGLLighting = "0"; showTerrainInside = "0"; }; new Trigger(checkpoint4) { canSaveDynamicFields = "1"; position = "-197.895 872.003 186.979"; rotation = "1 0 0 0"; scale = "60 5 20"; dataBlock = "CheckPointTrigger"; polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000"; isLast = "1"; checkpoint = "4"; }; new Trigger(checkpoint1) { canSaveDynamicFields = "1"; position = "-286.543 1041.54 156.512"; rotation = "0 0 1 26.356"; scale = "60 5 20"; dataBlock = "CheckPointTrigger"; polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000"; checkpoint = "1"; }; new Trigger(checkpoint2) { canSaveDynamicFields = "1"; position = "-371.272 630.384 155.087"; rotation = "1 0 0 0"; scale = "60 5 20"; dataBlock = "CheckPointTrigger"; polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000"; checkpoint = "2"; }; new Trigger(checkpoint3) { canSaveDynamicFields = "1"; position = "-264.127 518.151 145.923"; rotation = "0 0 1 89.3814"; scale = "60 5 20"; dataBlock = "CheckPointTrigger"; polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000"; checkpoint = "3"; }; new SpawnSphere() { canSaveDynamicFields = "1"; position = "-142.323 898.383 192.945"; rotation = "0 0 -1 10.4951"; scale = "1 1 1"; dataBlock = "SpawnSphereMarker"; Radius = "1"; sphereWeight = "100"; indoorWeight = "100"; outdoorWeight = "100"; homingCount = "0"; locked = "false"; lockCount = "0"; }; new SpawnSphere() { canSaveDynamicFields = "1"; position = "-154.957 897.763 194.53"; rotation = "0 0 -1 2.47371"; scale = "1 1 1"; dataBlock = "SpawnSphereMarker"; Radius = "1"; sphereWeight = "100"; indoorWeight = "100"; outdoorWeight = "100"; homingCount = "0"; locked = "false"; lockCount = "0"; }; new SpawnSphere() { canSaveDynamicFields = "1"; position = "-167.979 897.871 194.986"; rotation = "0 0 -1 2.47371"; scale = "1 1 1"; dataBlock = "SpawnSphereMarker"; Radius = "1"; sphereWeight = "100"; indoorWeight = "100"; outdoorWeight = "100"; homingCount = "0"; locked = "false"; lockCount = "0"; }; new SpawnSphere() { canSaveDynamicFields = "1"; position = "-143.463 929.037 192.885"; rotation = "0 0 -1 10.4951"; scale = "1 1 1"; dataBlock = "SpawnSphereMarker"; Radius = "1"; sphereWeight = "100"; indoorWeight = "100"; outdoorWeight = "100"; homingCount = "0"; locked = "false"; lockCount = "0"; }; new SpawnSphere() { canSaveDynamicFields = "1"; position = "-156.097 928.417 194.47"; rotation = "0 0 -1 2.47371"; scale = "1 1 1"; dataBlock = "SpawnSphereMarker"; Radius = "1"; sphereWeight = "100"; indoorWeight = "100"; outdoorWeight = "100"; homingCount = "0"; locked = "false"; lockCount = "0"; }; new SpawnSphere() { canSaveDynamicFields = "1"; position = "-169.119 928.525 194.926"; rotation = "0 0 -1 2.47371"; scale = "1 1 1"; dataBlock = "SpawnSphereMarker"; Radius = "1"; sphereWeight = "100"; indoorWeight = "100"; outdoorWeight = "100"; homingCount = "0"; locked = "false"; lockCount = "0"; }; new TSStatic() { canSaveDynamicFields = "1"; position = "-214.079 904.392 219.664"; rotation = "0.0698498 0.0515514 0.996225 107.35"; scale = "2 2 2"; shapeName = "~/data/shapes/trees/treea_1.dts"; receiveSunLight = "1"; receiveLMLighting = "1"; useAdaptiveSelfIllumination = "0"; useCustomAmbientLighting = "0"; customAmbientSelfIllumination = "0"; customAmbientLighting = "0.8 0.7 0.6 1"; }; new TSStatic() { canSaveDynamicFields = "1"; position = "-220.328 882.012 219.614"; rotation = "1 0 0 0"; scale = "2 2 2"; shapeName = "~/data/shapes/trees/treea_1.dts"; receiveSunLight = "1"; receiveLMLighting = "1"; useAdaptiveSelfIllumination = "0"; useCustomAmbientLighting = "0"; customAmbientSelfIllumination = "0"; customAmbientLighting = "0.8 0.7 0.6 1"; }; new TSStatic() { canSaveDynamicFields = "1"; position = "-211.945 935.638 209.513"; rotation = "1 0 0 15.4698"; scale = "1 1 1"; shapeName = "~/data/shapes/trees/treea_1.dts"; receiveSunLight = "1"; receiveLMLighting = "1"; useAdaptiveSelfIllumination = "0"; useCustomAmbientLighting = "0"; customAmbientSelfIllumination = "0"; customAmbientLighting = "0.8 0.7 0.6 1"; }; new TSStatic() { canSaveDynamicFields = "1"; position = "-208.929 921.685 215.407"; rotation = "1 0 0 13.178"; scale = "2 2 2"; shapeName = "~/data/shapes/trees/treea_2.dts"; receiveSunLight = "1"; receiveLMLighting = "1"; useAdaptiveSelfIllumination = "0"; useCustomAmbientLighting = "0"; customAmbientSelfIllumination = "0"; customAmbientLighting = "0.8 0.7 0.6 1"; }; new TSStatic() { canSaveDynamicFields = "1"; position = "-211.017 888.841 218.414"; rotation = "-0.0582764 -0.831159 0.552973 14.4525"; scale = "2 2 2"; shapeName = "~/data/shapes/trees/treea_2.dts"; receiveSunLight = "1"; receiveLMLighting = "1"; useAdaptiveSelfIllumination = "0"; useCustomAmbientLighting = "0"; customAmbientSelfIllumination = "0"; customAmbientLighting = "0.8 0.7 0.6 1"; }; new TSStatic() { canSaveDynamicFields = "1"; position = "-218.984 892.544 220.526"; rotation = "0 0 -1 73.9115"; scale = "2 2 2"; shapeName = "~/data/shapes/trees/treea_2.dts"; receiveSunLight = "1"; receiveLMLighting = "1"; useAdaptiveSelfIllumination = "0"; useCustomAmbientLighting = "0"; customAmbientSelfIllumination = "0"; customAmbientLighting = "0 0 0 1"; }; new TSStatic() { canSaveDynamicFields = "1"; position = "-222.468 875.204 220.681"; rotation = "-0.0747834 0.0624526 -0.995242 100.537"; scale = "1.5 1.5 1.5"; shapeName = "~/data/shapes/trees/treea_2.dts"; receiveSunLight = "1"; receiveLMLighting = "1"; useAdaptiveSelfIllumination = "0"; useCustomAmbientLighting = "0"; customAmbientSelfIllumination = "0"; customAmbientLighting = "0.8 0.7 0.6 1"; }; }; //--- OBJECT WRITE END ---