i have this script that iam working on and evrey thing works except for what i shoot the bullet it dosnt want to move foward stiil here is the script maby i typed something in wrong? import bge
def main():
cont = bge.logic.getCurrentController()
player = cont.owner
keyboard = bge.logic.keyboard
scene = bge.logic.getCurrentScene()
bulletspeed = 1000
if bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.WKEY]:
#move up
player.localPosition.y += 0.5
if bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.SKEY]:
#move down
player.localPosition.y += -0.5
if bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.AKEY]:
#move left
player.localPosition.x += -0.5
if bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.DKEY]:
#move right
player.localPosition.x += 0.5
if bge.logic.KX_INPUT_JUST_ACTIVATED == keyboard.events[bge.events.SPACEKEY]:
#bullet shoot
bullet = scene.addObject("bullet", "bulletspawn", 150)
bullet.applyForce((0, bulletspeed, 0), True)
main()