//    Instruction Example :      light.attenuate.range.set (objectid,float,float)


        Screen.Resolution.Set(512, 384)

        Screen.Set(BACK)
          Pattern.Display("avo\bubble.gif")
    Screen.End()

        @camera   = Camera.Create(0.0, 0.0, -100.0, 0.0, 0.0, 0.0)

        @viewport = Viewport.Create()
        Viewport.Camera.Set(@viewport, @camera)

        @light  = Light.Omni.Create(0.0, 100.0, -100.0)

    Mesh.Rotation.Stack(-30, 30, 0)
        @sphere = Mesh.Sphere.Create(35, 16, 16)
        Mesh.Light.Assign(@sphere, @light)

        Mesh.Display(@sphere)
        Viewport.Display(@viewport)

        Screen.Set(FRONT)
          Text.Display("Press a key to set the new ranges of attenuation of the light.", CENTER, 10)
        Keyboard.Wait()
          Light.Attenuate.Range.Set(@light, 100, 125)
          Light.Mode.Set(@light, LIGHT_ATTENUATEON)
        Box.Fill.Select()
        Box.Clear(0, 10, 512, 10)
          Text.Display("Press a key to exit.", CENTER, 350)
        Keyboard.Wait()
    Screen.End()

        Mesh.Kill(@sphere)
        Light.Kill(@light)
        Viewport.Kill(@viewport)
        Camera.Kill(@camera)
    Script.Stop()