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

2019/6/2

Changing Ships

Joyfu1 Joyfu1

2019/6/2

#
We would like the player to choose between the two ships shown in the picture above. However, we are confused as to how we would code this. We understand that we would have to possibly use IF statements and create two new ships which would be chosen. But how would we change the healthbar if the healthbar was created in greenfoot. Thank you!
danpost danpost

2019/6/2

#
Joyfu1 wrote...
<< Image "Link" Omitted >> We would like the player to choose between the two ships shown in the picture above. However, we are confused as to how we would code this. We understand that we would have to possibly use IF statements and create two new ships which would be chosen. But how would we change the healthbar if the healthbar was created in greenfoot.
What all was involved to create the "shown" image (in greenfoot)? That is, is it a total single image or are there actors shown in the image? If actors, which elements are actors?
Joyfu1 Joyfu1

2019/6/3

#
The image is a total single image.
danpost danpost

2019/6/3

#
Joyfu1 wrote...
The image is a total single image.
Okay, you can either check the location of the mouse when it is clicked, and act upon it if in one of the specified areas, or you can add "hit-box" actors into the world and check for clicks on them. Now, what exactly do you mean by change the health bar if it was created in greenfoot? and when would you want to do it?
You need to login to post a reply.