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

2012/2/2

Saved scenario's

Gavster27 Gavster27

2012/2/2

#
Hi, I've start using greenfoot today, hopefully someone can help me with this. Once I've saved a scenario I have been working on for an hour so and reload the saved file; I noticed its load the items I've using (flags or wombats). Is there a reason why the scenario loads up without the items? Sorry if it doesn't make sense as I don't have the laptop with me to explain better. Many thanks in advance.
danpost danpost

2012/2/2

#
When a scenario is reloaded, normally only the world constructor is executed (if it does not find any problems during the compiling of the scenario, and if it was last compiled at all). One way to tell if the scenario had completely compiled is to check the World class and Actor class trees on the right side of the screen. If there are diagonal stripes through any of the classes, then those classes need to be compiled (or errors need fixed in them and then compiled). Once all the classes are compiled without any issues, the world constructor will execute and load any items added within the code.
davmac davmac

2012/2/2

#
Also, actors you've added into the world manually don't get saved. You can use the "save the world" option (after right-clicking the world) to automatically generate code to add them in.
sp33dy sp33dy

2012/2/2

#
>Again, another useful tip! That will come in handy when I teach students in a few weeks time.
You need to login to post a reply.