I'm trying to give a fade-out effect for my "Shot" actor, and this is what I tried:
But with this I get the "non-static method cannot be referenced from static context". Do I need to reference the image?
I also tried it without the GreenfootImage. (so just setTransparency), but it didn't like that.
How does one use the setTransparency command? Thanks for any help :D.
if(shotLife < 15)
{
GreenfootImage.setTransparency(240);
}
if(shotLife < 10)
{
GreenfootImage.setTransparency(170);
}
if(shotLife < 5)
{
GreenfootImage.setTransparency(140);
}
if(shotLife < 2)
{
GreenfootImage.setTransparency(40);
}
