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

2018/12/13

how to add set actors in fixed positions in the world

TobyRoby TobyRoby

2018/12/13

#
hi guys I am new to greenfoot and object-oriented code in general, I was wondering if there is a way to place objects on the world by selecting new (actor name) and pressing the position then saving this position every time the world is loaded instead of doing the following: Crab crab = new Crab(); addObject(crab,165,215); Worm worm = new Worm(); addObject(worm,411,187);
danpost danpost

2018/12/13

#
TobyRoby wrote...
is a way to place objects on the world by selecting new (actor name) and pressing the position then saving this position every time the world is loaded instead of doing the following: << Code Omitted >>
There is the "Save the World" menu bar option that you can use after placing objects in the world (or after anything you do manually before running any act cycles).
TobyRoby TobyRoby

2018/12/13

#
ah, I didn't see that at the top, I thought there was a function you had to put in the world clas. Thank you :)
You need to login to post a reply.