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

2016/10/7

Is it possible ?

ricsipop ricsipop

2016/10/7

#
Hello. I am interested that if it is possible in Greenfoot . I want my world that when it starts, a window comes up which has names and empty squares in it, and I want to write numbers inside those squares which initializes how many of any of those objects will appear when I start to run my world. Is is possible ? Thank you for the answers.
danpost danpost

2016/10/7

#
ricsipop wrote...
I want my world that when it starts, a window comes up which has names and empty squares in it, and I want to write numbers inside those squares which initializes how many of any of those objects will appear when I start to run my world. Is is possible ? Thank you for the answers.
Of course it is possible. You can have your world activate a separate world to get the number of objects. Then have that world return to the main world to clear any unwanted actors and spawn the new number of actors. See what you can do, and if (and when) you have issues, show what you tried and we will help out.
ricsipop ricsipop

2016/10/7

#
I have two world. One is 'IR' , the second is 'adat'. "public IR() { super(600, 400, 1); addObject(new dsa(),50,50); World a = new adat(); a.addObject(new dsa(), 50, 50); } " With this I can watch object dsa in the IR world, but I can't see 'adat' world. "public IR() { super(600, 400, 1); addObject(new dsa(),50,50); World a = new adat(); a.addObject(new dsa(), 50, 50); Greenfoot.setWorld(a); } And with this I can see only the second world. Can't I reach to see both ?
danpost danpost

2016/10/7

#
You can only have one world active at a time. However, I did make a support class to view one world inside another. It is demonstrated in my PIP Actor Class scenario. It allows a world to be shown as an Actor object within another world. It actually demos multiple worlds within a world.
ricsipop ricsipop

2016/10/7

#
thank you !
You need to login to post a reply.