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

danpost's Comments

Back to danpost's profile

@mariq_rasyid29, please start a discussion thread on your issue. Explain in detail what you want to accomplish. Show any related codes.
I would be interested to see how you coded this. It is not simple code. How much help did you get for this? I created a working model of it and realized how involved it was. I only used Actor objects for the clickable boxes. I thought that having actors for the main grid would just make things more difficult to deal with.
Two issues: (1) color box of current color should be inactive (or at least not count as a step when clicked); (2) a static array is preventing a clean reset.
@AnJoMorto, are you not creating them with a true boolean? addObject(new Enemy(), x, y, true);
@Roshan123, adding of collection png not currently working properly. Been that way for some time now. Note my latest collection had issues as well.
Field declaration: GreenfootSound background_music; In constructor: if (background_music == null) { background_music = new GreenfootSound("Background_music.mp3"); }
Try assigning the music in the constructor of the world instead of on the field declaration line of the GreenfootSound object.
@SwaggyXiao, please refer to my Scrolling Tutorial scenario on image scrolling (see main text and link at bottom on "Actor follow scrolling code"). The scenario is located at: https://www.greenfoot.org/scenarios/18226
Scaling and re-scaling an image will usually distort and eventually "destroy" an image. Better would be to copy the image and scale it once; then go back and forth setting the appropriate image.