How to handle multiple actions for single character

I have a lego character which i move around using a xbox controller. I have 3 seperate actions for this character:
Walking
StopWalking
Idle

When i start the game, the character is using the idle action. When i move the joystick he starts moving but he is not walking, when he stops moving, the idle action no longer runs. The logic is:


From the printout, i can see that these actions are being activated, but i don’t see it. I have attached the blend file which contains the python script.

Any help would be appreciated.

Attachments

Lego_man_BGE_036.blend (5.68 MB)

Fixed it. You have to deactivate the actuators for the other animations before the new ones will function properly, which you can do with cont.deactivate(act_name).