Hi,
I’m trying to get this to work but not sure. What’s wrong?
import bge
def main():
# i guess get information neededcont = bge.logic.getCurrentController() player = cont.owner Move = cont.actuators["Move"] # variables movementVel=.2 rotationDeg=.01 # Just shortening names here keyboard = bge.logic.keyboard ACTIVATED = bge.logic.KX_INPUT_ACTIVE if keyboard.events[bge.events.WKEY] == ACTIVATED: player.setlinearVelocity([0,1,0],True) cont.activate(Move) #if keyboard.events[bge.events.SKEY] == ACTIVATED: # player.applyMovement((0,-movementVel,0),True) #if keyboard.events[bge.events.AKEY] == ACTIVATED: # player.applyRotation((0,0,rotationDeg),True) #if keyboard.events[bge.events.DKEY] == ACTIVATED: # player.applyRotation((0,0,-rotationDeg),True)
main()