if((Greenfoot.isKeyDown("a")))
if("a".equals(Greenfoot.getKey()))
These are two ways to call on a key being pressed to then make something happen in my case the key press spawns a unit, the 2nd one is what I want to use for all the actors in one of my worlds, because when "a" is pressed it is to spawn a unit, when I use the first one if i press the key only once it spawns like 3 or 4 guys. For some reason I can only use the 2nd one once in my world, so my question would be can you somehow use the 2nd one for all the actors in a single world, thanks for your time

