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

danpost's Comments

Back to danpost's profile

If you mean 'how to remove an uploaded scenario', then log in, go to your scenario you want to remove and click on the 'delete scenario' text on the right side just above the scenario window.
@Entity1037, I uploaded a new Fps actor class scenario for just that.
@Super_Hippo, my attempt was to create this scenario with as little code and with as much simplicity as possible to prevent lag at faster speeds. It has zero Actor classes, but four Actor objects (left and right arrows and the two displayed texts) and four global fields (two booleans for control and two ints -- speed setting and frame counter). Another thing is, with using keys, I would have to use 'getKey' as the change in speed of the scenario would totally mess with 'isKeyDown' (and I am not even sure if 'getKey' would not be messed with -- might have to test that).
You should only have to spawn the one initial player. It gets passed from world to world without any new ones being created. I am not sure what are you referring to with 'the add they have in the my world base class'. However the line in the world constructor that start 'addObject' can be removed. The player can immediately be added into the 'Room1' world (your 'world.addObject...' line) without being added into the current 'MyWorld' world.
@lordhershey, you are half right. You got the right location and some of the problem; but not the right correction. Remove the code in the Room1 class in the 'prepare' method that creates and adds a Player object into the world. Then right-click on your MyWorld icon and select 'new MyWorld()' from the drop-down list. That should fix the problem.
Requests for any methods not provided that may be helpful are welcome. I cannot, however, guarantee that they will be implemented. Thanks.
@emmkhajiit, it is just a matter of putting a positional check on the food: if (getWorld() != null && getY() > getWorld().getHeight()-20) getWorld().removeObject(this); When put as the last line in the act method of the class of the food, this will first ensure the actor is still in the world and then if it is and the actor is within 20 pixels of the bottom of the window, remove it from the world.
@dibo, I wonder if that is a personal problem. When, exactly, did this error occur (during compilation, after starting, after you clicked on a particular button, etc.)
@MatheMagician, as per my previous comment, the numbers below the series along the long diagonal can be removed (they are not used in the construction of the series). This will result in a triangle of hexagons where the values of the top row of hexagons are set to one and the rest are determined by them.