This site requires JavaScript, please enable it in your browser!
Greenfoot back
davemib123
davemib123 wrote ...

2015/11/9

2x problems with scenario

davemib123 davemib123

2015/11/9

#
I seem to have run into two problems: 1) at times when left or right arrow keys are pressed the character glitches and does not change to the correct facing direction. Other times it works fine, no problems. 2) when the scenario is uploaded it doesn't show up in the gallery my scenario can be found here: http://www.greenfoot.org/scenarios/15441
danpost danpost

2015/11/9

#
For problem (2): I think if you start the image strings for the hero with "hero/..." and start the image string for the stepping tiles with "level/", it should work uploaded. That is, remove the "./" from the beginning of your image filename strings.
davemib123 davemib123

2015/11/9

#
danpost wrote...
For problem (2): I think if you start the image strings for the hero with "hero/..." and start the image string for the stepping tiles with "level/", it should work uploaded. That is, remove the "./" from the beginning of your image filename strings.
tried that, has the same problem.
danpost danpost

2015/11/9

#
davemib123 wrote...
tried that, has the same problem.
Try removing the hyphens from the filenames or store them as basic 'png' type files.
davemib123 davemib123

2015/11/9

#
seems to be the folders. I just updated the file and removed the folders. Works fine and no problems.
danpost danpost

2015/11/9

#
Still seems to be an issue with (1) however. Will look into it.
davemib123 davemib123

2015/11/9

#
yea error 1 still persists.
danpost danpost

2015/11/10

#
I removed the 'isKeyPressed' field entirely and replaced the last 'if' block in the 'checkKeys' method with:
else stopWalking();
That should simplify things.
davemib123 davemib123

2015/11/10

#
its simplified it, but the left/right issue still remains. When a change is made and it is compiled it works. Once greenfoot is closed and reopened the glitch comes back. Update: I created Left versions to the images and that seems to have fixed the problem. strange. I'll reupload the scenario later in the week with several new updates.
You need to login to post a reply.