I wanted to know how do you get an actor image smaller (if possible using code) and make the background/ hit box transparent.


1 2 3 | GreenfootImage image = new GreenfootImage( "text" , 28 , null , null ); // to change the dimensions of the image you then do (to make it half the size) image.scale(image.getWidth() / 2 , image.getHeight() / 2 ); |
1 2 3 | GreenfootImage image = new GreenfootImage( "text" , 28 , null , null ); // to make an image transparent you then do image.setTransparency( 0 ); |