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

2017/10/3

HOW do I make it run only once?

Williamli Williamli

2017/10/3

#
Im making a game and I want to make i set its image only once. This is what I have:
setImage("block" + Greenfoot.getRandomNumber(3) + ".png");
The block keeps flickering from one image to another.
danpost danpost

2017/10/3

#
You probably placed the line in the act method. Create a constructor for the class and move the line into it. Post the class if you need further help with this.
You need to login to post a reply.