this is not finished*
this system rolls through a number of input channels and checks to see if the key is mapped,
if the key is mapped a list is added to an inputList
[‘GameCommand’,Index]
you then decide on a command input order
like
[ forward, left, down, right, jump, duck, sprint ]
so MoveDict = {“WKEY”:[‘Forward’,0], “UPARROWKEY”:[‘Forward’,0], “JOYSTICK_UP”:[‘Forward’,0] }
all of these potentially could add [‘Forward’,0] to the input list at any order in the input list
we then sort using
ListM = sorted(ListM, key=lambda tup: tup[1])
NL =[]
for entry in ListM:
if entry[0] not in NL:
NL.append(entry[0])
so the keypresses are indexed,
next they are rolled through and if they are not on the list they are added to it
this list is sent to a actor or used to call a function directly using a dictionary
Now we have all keys mapped using 1 system
Attachments
Serilizer_2.blend (470 KB)