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

What is happening right now?

danpost

reply to How can I spawn actors for a 5 second and then removed them and replace with others

By danpost - about 6 hours ago
BestMannCZ wrote...
Hi, I need help. I create actor called Vosa and I want spawn 15x Vosa on random position and after 5 seconds I wanna removed them and spawend another 15x Vosa, can you help me pls ?
First create a method to spawn one at any random location. Show method here to continue.
vysh

reply to Making objects fall in a certain area

By vysh - about 22 hours ago
Thank you lord danpost :D ! I'll try this out!
danpost

reply to Ayuda para que el objeto coma

By danpost - 1 day ago
Usa: <Code Omitted>
danpost

reply to Bringing functions from another class

By danpost - 1 day ago
Using just: <Code Omitted>in your Fish class indicates that the method is either (1) in the Fish class; (2) in any one of its super classes (as a non-private method); or (3) in an interface that one of the aforementioned classes implements. Since it (the method) is located in your Level2 class, you need to indicate that that is where to find the method. Actually, it is the Level2 object (your current world object) that "has" the method. It is the score in that world that you want to increment. The getWorld() method will return a reference pointer to that world; however, the returned type is of World -- not Level2. That is, the method to be called must be on a Level2 type object -- not just a World type object. You can adjust the cast type by using (Level2)getWorld() so the method can be found: <Code Omitted>