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

2011/11/30

Setting the Initial starting world or a scenario

rvevea rvevea

2011/11/30

#
Looking for a little help as I'm a bit confused. I've created a scenario with loads of worlds. I'm trying to implement a menu subclass of world and set it as the starting world (IE a Start menu :) ). The problem is, my scenario continuously jumps straight to the first world I created (World1) when I started the project, regardless of even the Superclass methods or constructor. Is there an easy way of just setting the initial world that is started? or will I really need to have some sort or switch case that setWorld()'s in my World1?
rvevea rvevea

2011/11/30

#
Just figured it out. For anyone else curious: Open your project.greenfoot in a text editor Locate the line: world.lastInstantiated=*WorldHere* Change *WorldHere* to the world you would like to run first.
davmac davmac

2011/12/1

#
Or, just instantiate the world class which you want to be the first world interactively, by right-clicking the class and calling the constructor. No need to go editing text files :)
You need to login to post a reply.