Im trying to make a script where it changes the action so that I dont have 8 logic bricks connected to my sensor. My question is how do u change the action? Here is my script and im using 2.55:
import bge
cont = bge.logic.getCurrentController()
#sensors
sensW = cont.sensors["W"]
sensS = cont.sensors["S"]
sensA = cont.sensors["A"]
sensD = cont.sensors["D"]
#actuators
actu = cont.actuators["Action"].action["F/ B"] #this line doesnt work
if sensW.positive:
cont.activate(actu)