Play action if custom property equals 1 and stop if it is 0


I have two actions ‘loc’ and ‘rot’, both are 20 frames long. Using the NLA editor I placed the ‘loc’ action in a new track.
Behind the ‘loc’ action (inside the same track) I put the ‘rot’ action.
If I play now my animation by ALT-A the object starts to move for 20 frames and then it rotates for 20 frames.
One action after the other. So far no problem.
Now I want this track / animation to play only on a special trigger.
E.g. if a custom property of a cube turns to 1 the track / animation should start to animate and if I turn the custom property back to zero, the track should stop. So I need a custom property to start / stop my ‘loc’ / ‘rot’ animation.

How can I do that using Blender?

(I use Blender 2.6 on a iMac)

So you want this to work in the Game Engine?

Hi Atom,

thanks for reply, no I don’t want to use the Game Engine.
I just need a way where I can trigger to start / stop and action by custom property or other property of an object.
So I want to trigger the action by different objects at different times.

Without the game engine you will have to write python code in an event handler to examine your custom property and apply the state to the target object. But this functionality can be setup in the Game engine without writing code.

Hi Atom,

thanks for your help, but unfortunately I am not an python export :-(.
Ok then lets try it with BGE, so how to start? Can I then start / stop an action by keyboard or what does BGE do than for me?
Are there some good tutorials to start / stop actions by BGE?