This site requires JavaScript, please enable it in your browser!
Greenfoot back
Back to discussions
rinariirin
rinariirin wrote ...

2017/11/7

how to make win screen

1
2
rinariirin rinariirin

2017/11/7

#
It the same game over code right?
danpost danpost

2017/11/7

#
rinariirin wrote...
It the same game over code right?
Essentially.
rinariirin rinariirin

2017/11/8

#
what if they get win got an
public WIN getWIN()
    {
        return thisWIN;
    }
error
Super_Hippo Super_Hippo

2017/11/8

#
Do you have a class called WIN? Is thisWIN a variable of type WIN? If the answer to both questions is Yes: What is the error message and what do you try to do with this method?
rinariirin rinariirin

2017/11/8

#
what method should use
Super_Hippo Super_Hippo

2017/11/8

#
It is not clear what exactly you need help with. You need to detect if the condition for the victory is met and then, you can make your win screen. Either change the background of the world or add an actor with an image showing the message.
rinariirin rinariirin

2017/11/9

#
I try to change the wold but it still no work
danpost danpost

2017/11/9

#
rinariirin wrote...
I try to change the wold but it still no work
How did you try this? Show what you tried. Cannot help unless you provide appropriate info and code (that which did not work).
rinariirin rinariirin

2017/11/9

#
wha6 is the code of this
danpost danpost

2017/11/9

#
That is twice now that you have answered a question (or you were asked to supply info/code) with a question. I must take that as you being unresponsive. If this behavior continues, I may be inclined to discontinue assisting you. Above:
Super_Hippo wrote...
Do you have a class called WIN? Is thisWIN a variable of type WIN? If the answer to both questions is Yes: What is the error message and what do you try to do with this method?
and your response was
rinariirin wrote...
what method should use
Then:
danpost wrote...
How did you try this? Show what you tried. Cannot help unless you provide appropriate info and code (that which did not work).
and you responded with
rinariirin wrote...
wha6 is the code of this
I have noticed that you have done similarly in other discussion threads you have started, as well.
rinariirin rinariirin

2017/11/9

#
I knew this programme it very hard to understand
rinariirin rinariirin

2017/11/9

#
danpost danpost

2017/11/9

#
Maybe you could return a new Victory object in the 'getVictory' method (just a guess).
rinariirin rinariirin

2017/11/14

#
hoe to rephrase this code
public game_over1 getGameOver1()
    {
        if (losehealthber = 0)
        {
            return game_over1;
        }  
    }
    public Healthbar getHealthbar()
    {
        if (touchinggator = false)
        {
            return thisHealthbar;
        }
    }
    public Victory getVictory()
    {
        if (scoreboard = 4)
        {
            return new Victory();
        }
the idea is to get the health bar go down first then game over screen the player collects all the spider then victory screen
danpost danpost

2017/11/14

#
To compare objects or values, you need to use the '==' operator, not the '=' operator which sets the value.
There are more replies on the next page.
1
2