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

2012/10/14

high score

1
2
scarereeper scarereeper

2012/10/14

#
how do i make a high score screen, levels, and a main menu screen
Gevater_Tod4711 Gevater_Tod4711

2012/10/15

#
if you want some different screens you could use some differnt worlds and change them using setWorld(/*the name of your world*/). Also you could use different objects for levels, highscores and menus.
scarereeper scarereeper

2012/10/18

#
make since im going to focus on levels first i want all my worms eaten before the next level, not just a single on goes to the next level,how
scarereeper scarereeper

2012/10/18

#
i have i problem with the connetion with my crab,my counter, and my world, every time compile it it says this: constructer Crab in class Crab cannot be complied in given types; found: no arguments reason: actual and formal arguments differ in length what is going on help, im trying to make the most advanced game on greenfoot
danpost danpost

2012/10/18

#
Use the following code right after 'getWorld().removeObject(worm);' in the 'eat' method:
if (getWorld().getObjects(Worm.class).isEmpty()) 
{
    // levelUp();
}
scarereeper scarereeper

2012/10/19

#
it didnt work it shows a shodow leavel up in the box,pss. i worked out the bug erroers more depscription tommorow goodnight
scarereeper scarereeper

2012/10/19

#
so i want my level so it starts out with LEVEL 2-LEVEL 10 and then i want it so it puts everything back in place EXCEPT there needs to be an extra lobster per level level 2 2 lobsters Level 3 3 lobsters and so forth please help
scarereeper scarereeper

2012/10/19

#
and i don't have an eat method. where the crab eats its all in the act section NO move method or eat method, only act method. i tried to put 2 different sections but mycrab wouldn't move
danpost danpost

2012/10/19

#
Then put it in your act method. For 'levelUp': - increase level counter - add a new lobster - replenish the worms
scarereeper scarereeper

2012/10/19

#
im now working on the scoreoard almost everything is complete the EXCEPT when i put this down if(Greenfoot.isKeyDown("enter")){ CrabWorld crabworld = (CrabWorld) getWorld(); CrabWorld.ScoreBoard(SCORE); getWorld().removeObject(this); } it says this: non-static method scoreboard(int) cannot cannot be refrenced form a static contex, i double checked my scoreboard my game over, my Crabworld, my Worms, My lobsters, everything and i still dont see whas wrong
danpost danpost

2012/10/19

#
You are getting a reference to your CrabWorld world in the first line of the 'if' block (you named it 'crabworld'). However, in the second line you are using the class name instead of the reference name to run the scoreboard(int) method. Change 'CrabWorld.ScoreBoard(SCORE);' to 'crabworld.scoreboard(SCORE);'.
scarereeper scarereeper

2012/10/19

#
i see thanks i fixed that now again i have another glitch public void scoreboard(int SCORE) { addObject(new ScoreBoard(600, 600), getWidth() / 2, getHeight() / 2); if (UserInfo.isStorageAvailable()) {//test to see if your data is avalable(logged in) UserInfo myInfo = UserInfo.getMyInfo();// set myInfo to UserInfo if (SCORE> myInfo.getScore()) //test to see if your score is better than your last { myInfo.setScore(SCORE);//set the score to your info myInfo.store();// store the info } } Score=SCORE; } when i do this at the bottom i has Score=Score; it says it doesnt have that variable (Score) but i really do Help!!! after this i think i will be done with questions about my scoreboard
danpost danpost

2012/10/19

#
Where is the 'Score' variable? is it an instance variable in the ScoreBoard class? If so:
public void scoreboard(int SCORE)
{
    ScoreBoard sb = new ScoreBoard(600, 600);
    addObject(sb, getWidth() / 2, getHeight() / 2);
    if (UserInfo ... { / / if block code / / }
    sb.Score = SCORE;
}
Game/maniac Game/maniac

2012/10/19

#
Remove Score = SCORE; then in your method gameOver() add:
CrabWorld world = (CrabWorld) getWorld();
world.scoreboard(points);
scarereeper scarereeper

2012/10/19

#
what does how d oa make a return type
There are more replies on the next page.
1
2