i need to reduce the transparency of an object every time it touches the other, say by 10
The GreenfootImage class has a setTransparency method you can use. You will need to track the currently set transparency value with an int field so you can first retain its current value and second limit any new value to the range (0, 255).