I don't understand your scene, but I've translated the code. Things move and there's no error messages 😀
import c4d
import math
def main():
global Out_NE, Out_NW, Out_SE, Out_SW
Range = 20 / math.sqrt(2)
Dist_NE = abs(-In_X -In_Y + 20) / math.sqrt(2)
Dist_NW = abs(In_X -In_Y + 20) / math.sqrt(2)
Dist_SE = abs(-In_X + In_Y + 20) / math.sqrt(2)
Dist_SW = abs(In_X + In_Y + 20) / math.sqrt(2)
Perc_NE = 1 - (Dist_NE / Range)
Perc_NW = 1 - (Dist_NW / Range)
Perc_SE = 1 - (Dist_SE / Range)
Perc_SW = 1 - (Dist_SW / Range)
if Perc_NE > 0:
Out_NE = Perc_NE
else:
Out_NE = 0
if Perc_NW > 0:
Out_NW = Perc_NW
else:
Out_NW = 0
if Perc_SE > 0:
Out_SE = Perc_SE
else:
Out_SE = 0
if Perc_SW > 0:
Out_SW = Perc_SW
else:
Out_SW = 0
180524-facelkjaf_5-coffee_script_0001.c4d