What is wrong with this code? Blender gives me no error, but always activates the one actuator… no matter what… ( set on a delay sensor for every 60 ticks) debug properties show that everything is working…
import bge
import random
def main():
cont = bge.logic.getCurrentController()
own = cont.owner
one = cont.actuators[“one”]
zero = cont.actuators[“zero”]
R = random.randint(1,6)
own['Random'] = R
if R == 1 or 2:
cont.activate(one)
elif R == 5 or 6:
cont.activate(zero)
else:
pass
main()