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

2012/12/9

Greenfoot.start() when initializing world

Zamoht Zamoht

2012/12/9

#
Okay so I think I've asked this before, but never found a fix. So the problem is that when I add Greenfoot.start(); to my world initialization (and upload the scenario to the gallery) it starts the program as it should, but if you click reset once, if statements like "if (Greenfoot.isMouseClicked(this))" won't work. I have this issue on my scenario Wombat Puzzles and Wombat Fighter. I have also encountered this problem on the "platforms og meh" scenario. Any suggestions? I think the problem is clear, but here is an example from Wombat Fighter.
public WombatMenu()
    {    
        // Create a new world with 600x400 cells with a cell size of 1x1 pixels.
        super(600, 400, 1, false); 

        setPaintOrder(Fader.class, Button.class, MenuObject.class);

        setOldSave();

        newSave = new TestWorld(50, 50, 0);

        setupMenu();

        Greenfoot.setSpeed(55);
        
        Greenfoot.start();
    }
Zamoht Zamoht

2012/12/10

#
bump.
danpost danpost

2012/12/10

#
It appears that might be a bug that you will not be able to correct. After hitting reset, I noticed that the 'Pause' button was present (which means the scenario should be running); however, I was able to drag-n-drop the menu options in the scenario (and I am sure that is not programmed into your scenario). BTW, I was using a downloaded version of 'Platforms of meh' @Greenfoot team, could you look into this please and inform as to what the problem might be -- thanks.
You need to login to post a reply.