I am trying to get an actor ("punchline") to appear when the enter button is pressed, at the moment I have the following code in my world file for this actor;
Punchline punchline = new Punchline();
if (Greenfoot.isKeyDown("Enter")) {
addObject (punchline, 300, 210);
}
This doesn't seem to work at all. What am I doing wrong?
Thanks