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

Comments for Multi Level demo

Return to Multi Level demo

A new version of this scenario was uploaded on Thu Jun 09 15:15:11 UTC 2011 Fixed small problem with levels having different screen sizes.
A new version of this scenario was uploaded on Thu Jun 09 15:25:55 UTC 2011 Sorry - forgot the include the source. It's there now.
HermanHerman

2011/6/9

Perfect Mik - it works out just fine.
A new version of this scenario was uploaded on Thu Jun 16 10:47:57 UTC 2011 The demo now shows how to move actors between worlds. The previous version created a new Pengu actor in each world. I have now modified this so that the SAME Pengu actor object moves from one world to the other. This may be important if you want to keep some state (such as a score) in the actor without losing it when moving to other levels.
A new version of this scenario was uploaded on Thu Jun 16 10:49:35 UTC 2011 Oops - added source again.
webmessiawebmessia

2011/6/19

WOOOOOOOOOOOOOOW!!!!! I have spent so long trying to emulate this functionality. This really does save my life :)
Lol i actually *did* implement this functionality in my Nightmare Scenario right before this was updated XD Doh!
bijoy508bijoy508

2011/6/26

there's 1 thing pissed me out about greenfoot , is that , like in this game, when pengu jumps from the cloud , and hits the middle of the ground(the soil beneath grass ), it should fall, rather it stays and if we press "jump " it goes to surface,, can anyone tell me, how to fix this?? or how to make an image like a solid object ?
hotrailshotrails

2011/6/26

The code is already at your feet, fool around, imagine what happens when you change -8 in -40 or whatever, happy coding roflol !!!
bournebourne

2011/6/26

@bijoy508 Are you asking why the penguin can move into the side of the cliffs and jump through the ground? I'd imagine making those 'cliffs' or sides of some object to act as a wall to your character or such.
JinnoJinno

2011/7/12

I'm having an issue when switching between worlds, where I have two worlds, and a common actor in between. Eventually when switching between the two worlds, I inevitably come across a Java out of memory error. I'm wondering if there's some sort of issue deleting the resources of each world in the setWorld method.
RichardRichard

2011/8/5

Hi, Thanks for the scenario. It was very helpful. I was wondering if sombody could give me some tips. Where does Greenfoot decides which world to start with. If I duplicate the first world, which I have created in the scenario (under a different name), Greenfoot still starts with the original world. How do I control with which world to start (without too complex coding). Richard
davmacdavmac

2011/8/5

Jinno - post something in the discussion forum, ideally with a link to your scenario which demonstrates the problem. Richard - whichever world you interactively instantiated (right click world class, "new XyzWorld()") is the one that Greenfoot remembers as the default world. (for more help, post in the discussion forum).
RichardRichard

2011/8/8

Hi davmac, thank for the reply. Sorry, I might missunderstand you. I created three worlds. The default one is the one I created first. How can I convince Greenfoot to start with the second or third world I created. In the example scenario on this page. How could we get Greenfoot to start with Level 2?
davmacdavmac

2011/8/8

Richard, As per my comment, to set the default world class: ... right click world class, "new XyzWorld()" ... I.e. first right-click on the world class (in the class tree) and then click "new XyzWorld()" (where "XyzWorld" is an example and will change depending on the class name). And please: (for more help, post in the discussion forum).
MrIncredibleMrIncredible

2011/8/8

MIK !!! Please look at my Thread in the Forum ! MrIncredible
mjoraidmjoraid

2011/11/19

How does it know its going to start from level1 ?? I mean where is the code that tell the world to start the game from the first level ??? Please let me know :) thanks
mikmik

2011/11/19

While you are developing, you can instantiate different levels interactively (by right-clicking your world subclass and selecting "new ..."). The world which you last instantiated interactively will be the one the scenario starts with.
mjoraidmjoraid

2011/11/19

Glad someone answered. I was trying to make another super class for my levels (subWorlds), since they all share stuff like background, but i faced some issue since they are all children of that class. I didn't know how to call them, so i make it simple, they are all subclasses of World. guess will try now to see how it works.
BradHBradH

2012/10/24

Hello I am creating a shooting game and i was wondering how to proceed to the next level once all the enemies are gone, thanks
HappyHarryHappyHarry

2013/3/18

this is such a bad game
Entity1037Entity1037

2013/6/10

I implemented this as a cheat to send the player into a blank room in my game, and it was working. However I was changing the layout of the room a bit and now the scenario freezes every time I use the cheat. I've tried changing the layout back to how it was before along with a multitude of other things, but it just won't work anymore. Does anyone know why?
@Entity1037 It would work better if you posted a discussion about this, with some code instead.
Thanks this really helped :)
VenbhaVenbha

2017/9/6

When I go backward in the second level, it doesn't go to first