A little stuck and could do with any sudjestions.
Aim:-
When the character goes past the middle of the screen, the background & level
move downwards so the character can get to higher places, think sonic the
hedgehog.
This is the bit I'm having problems with, I can get the character to get to the
center, the background moves up & down but the character won't go back down
when the level returns to normal height.
if bkGroundRect['rect'].top < 0 and charRect['rect'].top <
winCenterRect.top:
bkGroundRect['rect'].top += spY
platRect['rect'].top += spY
jumpRect.top += spY
charRect['dir'] = STOP
if levelRect['rect'].bottom > winHeight and charRect['rect'].centery ==
winCenterx:
bkGroundRect['rect'].bottom -= spY
platRect['rect'].bottom -= spY
# jumpRect.bottom -= spY
charRect['dir'] = STOP
#--this won't execute ? --#
if levelRect['rect'].bottom <= winHeight:
if charRect['rect'].centery >= winCenterx and charRect['rect'].centerx
< jumpRect.centerx:
charRect['dir'] = DOWN
I've included the whole code as a note pad so the above makes more sense, don't
worry about all the comments, that's just for my convenience.
Thanks guys
Mark
'knight meets wall, wall won't let knight pass, knight says 'neh'
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor