Keyboard game input doesnT works on other PC except mine

i senT a minigame (tested and working and executable) to my friend , he can do everything, except WASD controls, is there some update in the executable folder that he have to do for enable it?

WASD are made by python script, do he have to install something on pc for read the python?

Can you post the code please and we’ll take a look.

1 Like

import bge
#running from some empty with always true
import mathutils
from mathutils import Vector
import random
import aud
#sound= aud.Factory.file(“g:\sounds/soundhappy.mp3”)
#ost= (“C:/Users/nel/Desktop/meshNU/sounds/soundhappyv.mp3”)
#ost= (“g://sounds/soundhappy.mp3”)
device = aud.device()
crashC_S = aud.Factory.file(“C:\soundapbz/L_carcrash.mp3”)
#soundh = aud.Factory.file(ost)
#soundhbb = soundh.volume(0.1)
#if camm[‘soundd’] == True:
# device.play(soundh)
#camm[‘soundd’] = False
#carsound= aud.Factory.file(“C:\soundapbz/motore_driftC.mp3”)
#########################################################################
#suonooo=aud.play(musicmenuOUTRUN)
#suonooo.volume=1
#suonooo.stop()
###########################################################################
#device.play(motore)

scene = bge.logic.getCurrentScene()

mous = bge.logic.mouse.events
keys= bge.logic.keyboard.events
keys.update(bge.logic.keyboard.events)
keys.update(bge.logic.mouse.events)

w = bge.events.WKEY
a = bge.events.AKEY
d = bge.events.DKEY
s = bge.events.SKEY
spa = bge.events.SPACEKEY
lsh = bge.events.LEFTSHIFTKEY
ctr = bge.events.LEFTCTRLKEY ##da usare per chiamare team vicino
f = bge.events.FKEY
q = bge.events.QKEY #store_menu (se si è vicino team/store item apre 2 pagine di scambio
e = bge.events.EKEY
r = bge.events.RKEY
t = bge.events.TKEY ########test key
k = bge.events.KKEY ##for resuscita zombie tutti
z = bge.events.ZKEY ###for zombies +++
c = bge.events.CKEY ###for civilian++
tab= bge.events.TABKEY
rmb = bge.events.RIGHTMOUSE
lmb = bge.events.LEFTMOUSE
mmb = bge.events.MIDDLEMOUSE
one = bge.events.ONEKEY
two = bge.events.TWOKEY
tre = bge.events.THREEKEY
qua= bge.events.FOURKEY

Does your friend have a folder on C: called “soundapbz” which contains “L_carcrash.mp3”?
If not, then that’s why your script is failing.

If that’s not the cause, then please post the part of the script that checks which keys are pressed.

1 Like

ty so much :smiley:

1 Like

have fun with my game :smiley: can i post there?
https://files.fm/u/apgdyfkg

@Kellylarossa 2 things I’d like to say off-topically to you.

Post your game in #game-engine:works-in-progress-and-game-demos if your planning to update your project. Otherwise in #game-engine:finished-games.

1 more thing, please use code tags for when you paste code, it makes code way easier to read.
There’s even a built-in copy with 1 click code function that allows anyone to copy the text contained in the code tag.

1 Like