PYTHON: Setting frame number of action

I’m sure there must be a way to set an objects position in it’s animation using python
I can’t find it in the API though. Am I just missing it, or does it not exist?
obj.setFrame(frameNumber, interpolate)

Or something.

The last time I was using setFrame() it did not work. I’m not sure if that is fixed.
I usually use the property mode of the action actuator if I need that much control over an action.

Not sure what you want to do.
You want to set the frames lenght, frame start or go to a specific frame?

I think it’s own.getActionFrame() and own.setActionFrame()

You can also get and set the current frame through the action actuator.

Hope this helps :smiley:

Thanks, setActionFrame() is what I’m looking for.

when I tried to use playAction ()

I could not run BLENDIN.

playAction(name, start_frame, end_frame, layer=0, priority=0, blendin=0, play_mode=ACT_MODE_PLAY, layer_weight=0.0, ipo_flags=0, speed=1.0)

then ACT_MODE_PLAY is wrong, have to put | bge…something…ACT_MODE_PLAY |

if you can make a tutorial :wink:

Start a new thread for that. Not relevant here. Also, Actions, Ipo’s, F’Curves etc. are really not my thing.