I am trying to use python to reassign the value a property actuator sends out. The program works fine, besides not reassigning the new value. I move around the “cont.activate(camname)” line to confirm that the line works everywhere besides directly after the “camname.setproperty(“cam1”)” line. Please help if you can. Thanks. I have blender v. 2.6.3 and I have am using a string type property
import bge
def main():
cont = bge.logic.getCurrentController() own = cont.owner
contzero = cont.sensors['0'] contone = cont.sensors['1'] key1 = cont.sensors['key1'] key2 = cont.sensors['key2'] key3 = cont.sensors['key3'] cam0 = cont.actuators['cam0'] cam1 = cont.actuators['cam1'] camname = cont.actuators['camname'] if contzero.positive: cont.activate(cam0) camname.setproperty("cam1") cont.activate(camname) if contone.positive: cont.activate(cam1)
main()