I’m trying to write a script, so my character can perform combos. The script works in the local file but not when I link it to another file. I’m using a function to set the values of an action actuator. I get an error saying actuator.action = val (value error). I’m revising the code an will post the revised one if I still have the error. My question is "is it a bad idea to dynamically set the values of an action actuator withing a state? "
No, it is not.
I do that since Blender 2.37
Value error means the value you apply is not applicable. Make sure it is a string and it names an existing action. That means an action with that name should exist in the scene (or being linked from another blend).
You might need to setup an action actuator for each single action you want to link. You do not need to activate the actuator. YOu just need to refer to it.
E.g. you have this files:
- character.blend with the armature and skin meshes
- poses.blend with the actions
- game.blend as game using the character.
poses.blend contains a game object (ActionHolder) with actuators as explained above. E.g. walking, standing, jumping
They are all referred by action actuators which are owned by the ActionHolder.
When you link ActionHolder into game.blend you get all the actions it refers to.
I think since 2.6. The action holder does not need to be an armature as you can refer to any type of action. But I haven’t tested that.
I hope it helps
Monster, you are a life saver. (Monster-Ironic)