yeah,
adjusting that value is how long to wait before clearing the list if a button is not pressed,
I ended up getting the best results with changing 59 to
if own['MoveList'] == [['Right','space'],['Down','Right'],['Down']] or own['MoveList'] == [['space'],['Right'],['Down','Right'],['Down']] :
print("FireBall")
own['MoveList']=["FireBall"]+own['MoveList']
added = bge.logic.getCurrentScene().addObject('FireBall',own,120)
also, change space sensor to ‘tap’
import bge
def main():
cont = bge.logic.getCurrentController()
own = cont.owner
if own['MoveList']=="Empty":
own['MoveList']=["blarg"]
own['PopTimer']=0
space = cont.sensors['space']
Down = cont.sensors['Down']
Right = cont.sensors['Right']
ListS = [Down,Right,space]
move=["Empty"]
print(str(own['PopTimer']))
if own['PopTimer']>=1:
own['PopTimer']-=1
if own['PopTimer']==0:
own['PopTimer']=35
own['MoveList']=[]
if own['timer']==0:
for sensors in ListS:
if sensors.positive:
if move[0] == "Empty":
move=[sensors.name]
else:
move+=[sensors.name]
if move[0]!="Empty":
own['timer']=10
print(move)
own['MoveList']=[move]+own['MoveList']
own['PopTimer']=35
else:
if own['timer']>=1:
own['timer']-=1
print(str(own['timer']))
if own['MoveList'] == [['Right','space'],['Down','Right'],['Down']] or own['MoveList'] == [['space'],['Right'],['Down','Right'],['Down']] :
print("FireBall")
own['MoveList']=["FireBall"]+own['MoveList']
added = bge.logic.getCurrentScene().addObject('FireBall',own,120)
print(str(own['MoveList']))
x=0
for items in own['MoveList']:
x+=1
if x>6:
own['MoveList'].pop(5)
own['Status']=str(own['MoveList'])
main()
seems to work well for me, (timing is tricky on the keyboard as you can’t “Roll”)
have you tried applying this to a joystick yet?
and do joysticks have a down right button?