Python, world colors, and coordinates

Hi. I am Python retarded. But I want to make a script that changes the mist and background colors based on where my character is at in his environment. My idea is that I will have four empties at four corners of the environment, and how close he is to them determines the colors. Any suggestions (with code included)? Thanks!

import Rasterizer as Raster

Raster.setMistStart(V1)
Raster.setMistEnd(V2)
Raster.setMistColor((R,G,B))

Raster.setBackgroundColor((R,G,B,A))

:wink:
I don’t know why, but that works only if the World Settings are deletet.
Doc