Blender ignoring an actuator!?!

I’ve been having a very irritating and random problem. It seems that after I link an actuator (state actuator to be exact) to a python controller it will suddenly refuse to admit that actuator’s existence! I list the actuator with “fall = c.actuators[“fall_state”]” and that’s all good but after I try to activate it “c.activate(“fall”)” the console gives me this error:
ValueError: “fall” not in this python controllers actuator list

Yet I’m looking strait at the link. :confused: The same thing happened to my “normal_state” in another script. I renamed that actuator to “normal” and it’s all good and happy but any other name and it flips out. I’m using 2.49b with the new API. Is there a weird naming rule or is this a bug?

I think you have to say either:



c.activate("fall_state") # not so sure about this one 

That solved my problem! I thought you had to have the""
works perfect without them, fails with them. Thank you!

A more complete explanation:

the c.activate(actuator) method takes an actuator object as an argument, not a string, which is what you were using.

fall = c.actuators['fall_state']
c.activate(fall)        #fall is an actuator object, so this works
c.activate(c.actuators['fall_state'])  #this WILL also work
c.activate("fall")     #now you're giving it a string... this will fail.
c.activate("fall_state")  #this also won't work... you're giving it a string argument

Hope that helps!

Thank you for the explanation!