So I´ve got one problem. I want to add every time when the player hit 1 that a greenstone is spawning on the first cell and I want that every time when the player hit q that a red stone is spawning on the first cell.
I wrote this:
Probably this works but there is one fail in it, if I press to long the Key it is going to spawn many of red stones.
How can i fix it ?? I just want that there is just one stone spawning???
public void act() { if (Greenfoot.isKeyDown("1")) { getWorld().addObject(new redStone(), 1,0); }