I have two action actuators, and I need to switch between the two immediately once a variable has changed. I have tried multiple things such as logic bricking the set up and using this script:
import bge cont = bge.logic.getCurrentController() own = cont.owner sens = cont.sensors['Move'] if sens.positive: if own['Y Axis'] == 1: cont.activate(cont.actuators['Y Axis']) cont.deactivate(cont.actuators['X Axis']) else: cont.activate(cont.actuators['X Axis']) cont.deactivate(cont.actuators['Y Axis'])
own['Y Axis'] is the variable that this is dependent on. It works the first time the variable is switched, and then it doesn't work afterwards. The actuators, Y Axis and X Axis are Action actuators with the Loop End playback type set. How can I do this? Thanks!