# BGE Action Actuator and Motion Actuator

I'm making a 3D Pacman game using BGE. I have an action actuator that plays the Pacman mouth animation. That works, but when I add the Motion Actuator for the player to rotate the character, everything moves fine, except the mouth. If I remove the action actuator, the whole character rotates, but the mouth is always closed.

I tried looking for similar problems online for about 2 or 3 hours and found nothing.

Found an answer that fits my needs. I made this Python script that stops the action actuator, rotates to the desired position and then plays the animation again. I also added an always sensor to keep pacman moving on the direction defined by the "direcao" property.

from bge import logic
import math
controller = logic.getCurrentController()
own = controller.owner

name = "AnimaBocaAcao"
start = 1.0
end = 24.0
layer = 0
priority = 1
blendin = 1.0
mode = logic.KX_ACTION_MODE_LOOP
layerWeight = 0.0
ipoFlags = 0
speed = 1.0

sensors = own.sensors

if own["direcao"] == "dir":
own.applyMovement([0,0.02,0])
elif own["direcao"] == "esq":
own.applyMovement([0,-0.02,0])
elif own["direcao"] == "cima":
own.applyMovement([-0.02,0,0])
else:
own.applyMovement([0.02,0,0])

if sensors["W"].positive:
own.stopAction()
own["direcao"] = "cima"
if sensors["S"].positive:
own.stopAction()
own["direcao"] = "baixo"
if sensors["A"].positive: