Right now I have code for a counter that counts down by one each act till 0, then I need it to reset after I press a certain key but only if the counter is at 0. So something like "if counter = 0 and isKeyDown("x")". Is this possible?
if ((counter == 0) && Greenfoot.isKeyDown("x")) {
doStuff()
} if (Greenfoot.isKeyDown("x"))
{
if (counter = 0)
{
counter = 500;
}
}