there is an actuator with the same name as the string
but the animation freezes on the first frame
this has never happened before.
first I was having problems with .playaction so i just changed my setup to only rely on cont.activate. now that does not work either. Has anyone had any problems with cont.activate animation not progressing?
I have tried a situation where it is constantly triggering, and also a situation where it only triggers .activate once.
As cotax already wrote it is better to isolate single statements, especially when the code does not work as expected. Check what is input against the allowed input.
I hope you see this code has several problems:
“armature” and “cont” are not defined. This will result in errors.
Assuming (and you can be sure a compiler never assumes) that
-> “armature” is a KX_GameObject and
-> “cont” is a SCA_PythonController
you can conclude
objectA is assigned to a string
objectB is assigned to the value of a property of a KX_GameObject. The name of the property is “actuator_name”. The type will be determined at runtime.
objectC will be a SCA_IActuator if objectC is the name (string) of a connected actuator
the cont will be called with objectC as argument
You can print all objects to console to check if the content matches your expectations.
print(objectA, objectB, objectC)
cont.activate(objectC) will have effects only when objectC is