Hi I don't know my title has the correct terminology
I am trying to run some code ONLY if the image of the object is not already a particular image.
I have tried this:
and slightly different
ps sorry Bill
1 2 3 4 5 | if ( this .getImage().toString() != "Image file name: billgates.png" ){ this .setImage( "skull.png" ); Greenfoot.delay( 1 ); this .setImage( "billgates.png" ); } |
1 2 3 4 5 | if ( this .getImage().toString() != "billgates.png" ){ this .setImage( "skull.png" ); Greenfoot.delay( 1 ); this .setImage( "billgates.png" ); } |