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

2014/9/19

Problem with setimage() method.

Akash_Pingua Akash_Pingua

2014/9/19

#
How to use two different setimage() methods in the same function ? On using, the second setimage() over-writes the first one...!!!
Super_Hippo Super_Hippo

2014/9/19

#
What do you want to achieve with this? What is your code so far? (Use the 'code' tags!)
Akash_Pingua Akash_Pingua

2014/9/19

#
i want to use two tags one is "score" and the other "time left". The first tag is "score" and the second one is "time left". but the prob is that both the tags are named as "Time left" while execution. I m using: setImage(new GreenfootImage(" Score: "+score+ " ", 30, Color.BLUE, Color.BLACK, Color.GREEN)); setImage(new GreenfootImage(" Time left: "+time+ " ", 30, Color.BLUE, Color.BLACK, Color.GREEN)); Help plz.
Super_Hippo Super_Hippo

2014/9/19

#
So you have one actor which you want to display both? Or you have two actors and one should display the score and the other the time? (You said "both tags are named as "Time left"" which means for me, that you have two actors.) If you have two actors, one actor should get one line, and the other gets the other line. If you have only one actor, I think you can use " Score: "+score+ "\n" + " Time left: "+time to display it in two lines. But I never tried to use a GreenfootImage with more than one line, so I am not sure if this will work. Usually, I would have one actor to display one, and another one to display the other.
Akash_Pingua Akash_Pingua

2014/9/19

#
Thanx a lot dude...!!! Completely satisfied with your suggestion. Keep coding. :)
You need to login to post a reply.