hi i have here some script that i found on the internet for moving a character it works on 2.41 but not on the newest release 2.42a
speed = 4.0
jspeed = 5.0
sqrt2over2 = 0.70710678
cont = GameLogic.getCurrentController()
obj = cont.getOwner()
act = cont.getActuator(“move”)
onGround = cont.getSensor(“onGround”)
if onGround.isPositive():
jump = cont.getSensor(“jump”)
fwd = cont.getSensor(“fwd”)
back = cont.getSensor(“back”)
slft = cont.getSensor(“slft”)
srght = cont.getSensor(“srght”)
run = cont.getSensor(“run”)if run.isPositive(): speed = 6.0 fspeed = speed * (fwd.isPositive() - back.isPositive()) sspeed = speed * (srght.isPositive() - slft.isPositive()) if fspeed and sspeed: fspeed *= sqrt2over2 sspeed *= sqrt2over2 jump = jspeed * (jump.isPositive()) act.setLinearVelocity(sspeed, fspeed, jump, 1) if [sspeed,fspeed, jump] == [0.0, 0.0, 0.0]: GameLogic.addActiveActuator(act,0) else: GameLogic.addActiveActuator(act, 1)
else:
GameLogic.addActiveActuator(act,0)
SOS! i really need to get it working with 2.42a coz i dont want to use the logic bricks… Please…