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

2012/9/5

Play and pause game greenfoot

isaiasdd isaiasdd

2012/9/5

#
how to play and pause through keyboard shortcuts
danpost danpost

2012/9/6

#
Or, how do you create keyboard shortcuts for 'Pause' and 'Play'? (and 'Reset' and 'Act'; but I am sure that once we learn how to do one, we can figure out the others)
Zamoht Zamoht

2012/9/6

#
'Pause', 'Reset' and 'Act' should be easy. if (Greenfoot.isKeyDown("whatEverKey") { Greenfoot.pause(); } but when the game is paused the program would not check if the key for Greenfoot.start(); was pressed.
isaiasdd isaiasdd

2012/9/6

#
good to pause the game is working, more to continue not working and do not know why.
if(Greenfoot.isKeyDown("escape")){
            Greenfoot.stop();
        }
        if(Greenfoot.isKeyDown("r")){
            Greenfoot.start();
        }
danpost danpost

2012/9/6

#
@Zamoht, this really was not a programming question (in the sense of writing an application or scenario). It was more of a tweek question that probably should have classed under 'Other' instead of 'Programming'. The solution is probably solved by editing one of the greenfoot default files, but I cannot be sure.
Zamoht Zamoht

2012/9/6

#
Oh I see. Got confused because of the category (: (And to correct myself it's Greenfoot.stop() not Greenfoot.pause())
davmac davmac

2012/9/6

#
Check the "controls" menu; the shortcuts are listed there.
You need to login to post a reply.