Hi im using blender 2.49a i have a person animation, i want it to walk, stop walking, sit, get up and walk again. But i dont know to do this with python script. The animation starts walkng, then it stops walking. when it does this i need it to sit, but then how can i make it get up and then walk again. Because is i activate all the actuators, he hits with the floor i imagine that he does all the actuators in the same time how can i fixed it. Haow can i make an actuator one after another?
You can give some exmaple, or a link to see more about these? This is the first time im going to use a message, so im new in this.
Sophie, use timer properties, or frame properties to tell what part of your animation you are at.
A timer property always counts upwards, so you can use it to tell how much time has passed.
Alternately you can set your actuators FrameProp value to a property on the object. That property will always be equal to the current frame of your animation. Then use python to change the animation at certain frames.
con = GameLogic.getCurrentController() own = con.owner actionactuator = con.actuators["actionactuator"] if object["frameprop"] > 30 and actionactuator.action == "walk": actionactuator.action = "sit"
there is a way to do something like this, but with sound actuator?
Some years ago I wrote a tutorial. I never finished it, but the important parts are already there. It is with logic bricks only.
You can find it at http://gameblender.wikia.com/wiki/FSM_with_logic_bricks_1
This might help you with your project.
Wouldn’t using states be a better approach ?