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

2018/2/7

Play charater idle animation if there aren't any keys pressed

3
4
5
6
7
danpost danpost

2018/2/26

#
Please provide your 'areaTwo' method for review. Also, if you can, provide the scrolledX amount when area 2 is built.
LaurentiuRohan LaurentiuRohan

2018/2/26

#
danpost wrote...
Please provide your 'areaTwo' method for review. Also, if you can, provide the scrolledX amount when area 2 is built.
Coud you give me an email adress to send my project to you via e-mail, I think it would be more easily for you to analyze better. Just to help me solve this spawning problem. Please
danpost danpost

2018/2/26

#
LaurentiuRohan wrote...
Coud you give me an email adress to send my project to you via e-mail, I think it would be more easily for you to analyze better. Just to help me solve this spawning problem. Please
I would prefer you share the scenario here on the site. Make sure you check the box to provide the source codes.
LaurentiuRohan LaurentiuRohan

2018/2/26

#
danpost wrote...
LaurentiuRohan wrote...
Coud you give me an email adress to send my project to you via e-mail, I think it would be more easily for you to analyze better. Just to help me solve this spawning problem. Please
I would prefer you share the scenario here on the site. Make sure you check the box to provide the source codes.
Ok this is it http://www.greenfoot.org/scenarios/20895
danpost danpost

2018/2/26

#
I got it. Running into a lot of sound file errors, however. Have to work through them.
LaurentiuRohan LaurentiuRohan

2018/2/26

#
danpost wrote...
I got it. Running into a lot of sound file errors, however. Have to work through them.
Thanks, but how could I solve them, ant the problem with spawning?
danpost danpost

2018/2/26

#
Getting all sorts of errors -- now java heap space error is being thrown due to graphics. Your 9600 scrolling background takes up way too much memory. Cannot get around it with the SWorld (Scrooling_World) class. You should definitely consider trying the Scroller class instead. You can reduce the background image of the mace world to 820 wide and the Scroller class will wrap it for you. That alone would be quite a relief on memory.
LaurentiuRohan LaurentiuRohan

2018/2/26

#
danpost wrote...
Getting all sorts of errors -- now java heap space error is being thrown due to graphics. Your 9600 scrolling background takes up way too much memory. Cannot get around it with the SWorld (Scrooling_World) class. You should definitely consider trying the Scroller class instead. You can reduce the background image of the mace world to 820 wide and the Scroller class will wrap it for you. That alone would be quite a relief on memory.
Ok, I will do that, but I want now to solve the problem with object spawning....Or it's due to much and bigger grapichs?
danpost danpost

2018/2/27

#
I makes no sense to work on object spawning at this point. After the Scroller world is implemented, things will be much easier. I hate to use these next couple of words -- but, I just gotta' do it
Believe me.
LaurentiuRohan LaurentiuRohan

2018/2/27

#
danpost wrote...
I makes no sense to work on object spawning at this point. After the Scroller world is implemented, things will be much easier. I hate to use these next couple of words -- but, I just gotta' do it
Believe me.
Wll now Ițve updated the scenario changhing the Scrooling_World with the code that you've used in Scrolling SuperWorld : http://www.greenfoot.org/scenarios/6719
danpost danpost

2018/2/27

#
You did not understand. I previously linked a totally different Scroller class which you will need to use.
LaurentiuRohan LaurentiuRohan

2018/2/27

#
danpost wrote...
You did not understand. I previously linked a totally different Scroller class which you will need to use.
This one ? http://www.greenfoot.org/scenarios/18226
danpost danpost

2018/2/27

#
LaurentiuRohan wrote...
danpost wrote...
You did not understand. I previously linked a totally different Scroller class which you will need to use.
This one ? http://www.greenfoot.org/scenarios/18226
Yeah. Well, that is the tutorial that uses that one.
LaurentiuRohan LaurentiuRohan

2018/2/27

#
danpost wrote...
LaurentiuRohan wrote...
danpost wrote...
You did not understand. I previously linked a totally different Scroller class which you will need to use.
This one ? http://www.greenfoot.org/scenarios/18226
Yeah. Well, that is the tutorial that uses that one.
I've found an easy way to solve the problem. But now I have another problem. I maded Puppy to build world every time that he is touching the water that I've added in every level of the game. But if the lives are < 0 I want that to get GameOver_World. I tried this mehod but doesn't work, how should I do?
  if(getOneObjectAtOffset (0, getImage().getHeight() , Water.class)!= null)
       {
           
           if (getWorld() instanceof Mace_Level)
            {
                Mace_Level Mace_Level = (Mace_Level)getWorld();
                Mace_Level.decreaseLives();
                Mace_Level.updateScoreboard();
                Greenfoot.setWorld(new Mace_Level());
            }
            if (getWorld() instanceof Mace_Level && lives < 0)
            {
                Greenfoot.setWorld(new GameOver_World());
            }
            
            if (getWorld() instanceof Saw_Level)
            {
                Saw_Level Saw_Level = (Saw_Level)getWorld();
                Saw_Level.decreaseLives();
                Saw_Level.updateScoreboard();
                Greenfoot.setWorld(new Saw_Level());
            }
            if (getWorld() instanceof Orc_Level)
            {
                Orc_Level Orc_Level = (Orc_Level)getWorld();
                Orc_Level.decreaseLives();
                Orc_Level.updateScoreboard();
                Greenfoot.setWorld(new Orc_Level());
            }
            if (getWorld() instanceof Boss_Level)
            {
                Boss_Level Boss_Level = (Boss_Level)getWorld();
                Boss_Level.decreaseLives();
                Boss_Level.updateScoreboard();
                Greenfoot.setWorld(new Boss_Level());
            }
       } 
danpost danpost

2018/2/27

#
In your Menu world constructor, add the following line:
Puppy_Player.lives = 3;// or whatever starting value it is supposed to get
Then in the Puppy_Player class, change the field declaration line for 'lives' to this:
public static int lives;
There are more replies on the next page.
3
4
5
6
7