I noticed a couple of problems:
The “customMouse.py” script uses deprecated Python methods, which can be updated using the “Convert BGE 2.49” option in the Text Editor (Text -> TextPlugins -> Convert…). But that doesn’t change everything, look at the code I post below. (“own.init”)
The code is looking for a property named “init” on the Empty, which isn’t there.
The Circle has to be set “Twoside” in the Texture Face Settings in Edit Mode to be visible (?)
The Circle has to be on a “hidden layer”, otherwise it says “Warning…” and doesn’t work. The problem is that the other script is looking for the circle on the active layer, so you would have to make two single objects, one as color-indicator and the other as “paint”.
When all this changes are made you can draw, but you can draw everywhere. One solution would be giving the plane (drawing area) a property and have the Python Script activate/deactivate drawing if the property is there or not (means if the mouse is over the plane or not). The problem is, that the circles already added when you drew something cover up the plane which would deactivate drawing. So the Circle should also have that property.
I would also change “mPosi.raySource” to “mPosi.hitPosition”, the first would return the start point of the sensor ray, the second returns the point where it detects the plane.
Might be a bit confusing, so here’s my revised version of the script:
import Rasterizer as R
cont = GameLogic.getCurrentController()
own = cont.owner
mPosi = cont.sensors["MousePosi"]
### Start mouse position at center of game screen
if own["init"] == 1: # deprecated: own.init, updated: own["init"]
own["init"] = 0
### Move cursor to mouse position
cursorPosi = mPosi.raySource
own.localPosition = cursorPosi
Hope I could help you,