I am displaying text on the screen, and trying to make it so that with a specific text another actor will set another image. Please help as soon as you can!! This is the code
I am getting a null pointer exception...
StuffThatFlies stuffThatFlies;
public Text(String words )
{
GreenfootImage img = new GreenfootImage(100, 50);
img.drawString(words, 2, 20);
setImage(img);
if(words == "plane")
{
stuffThatFlies.setImage("airplane.png");
}
