This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
Image Resizing Issue in Greenfoot
By Biscuits1, with 2 replies.
Last reply by Super_Hippo, over 7 years ago:
The image in the "actor box" is only the default image. Inside the Crab class, there is code which sets the crab images to the crab (it alternates between two to make it look like moving). You can find the code by searching for "setImage" inside the class. Changing the default image doesn't change the code. It only changes the image if the image isn't set in the class code.
How do i fix this?
By t.jongsma, with 2 replies.
Last reply by Super_Hippo, over 7 years ago:
Try to swap lines 11 and 12. And move line 10 into the constructor. No need to execute it every act cycle: <Code Omitted>
My Scenario is not starting
By Xanxus, with 4 replies.
Last reply by Xanxus, over 7 years ago:
I dont know why this error message shows up
Create Timer
By RedMine360, with 2 replies.
Last reply by RedMine360, over 7 years ago:
Nice thx and the information about the 60 act cycles is also very usefull.
Actor not in world
By Kofi11, with 2 replies.
Last reply by danpost, over 7 years ago:
RedMine360 wrote...
If removeEnemy() is also removing the Enemy than thats the problem. After it got removed by removeEnemy(), hitByProjectile() is starting but it is not there anymore. Possible soultion check if Enemy is on the field and only than it is possible to get hit. << Code Omitted >>
Sorry, but that is not a possible solution. In fact, it has the same failings as the initial issue -- a
NullPointerException
error will be thrown on line 5, here. You cannot call a method (
getObjects
,
removeObject
or any other
World
method) on the returned value of
Emergency Guys!! How can randomly moving object not move through wall??
By yalamberingnam, with 30 replies.
Last reply by yalamberingnam, over 7 years ago:
Yes, I have used this code in my project. Thank you for your time I appreciate.
Adding in objects randomly
By coreypants03, with 8 replies.
Last reply by danpost, over 7 years ago:
The field name should probably actually be
curTime
, meaning the current time. It, as well as
lastAdded
, whose value is the actual time that an enemy was last added into the world, should both be declared somewhere. Since the
lastAdded
field needs to be retained through multiple act steps, it must be declared outside the method:
Adjust infinite scroll background speed!
By stantwice, with 1 reply.
Replied to by Super_Hippo, over 7 years ago:
Show your code.
Scoreboard - Broken!
By CreatorMoon, with 6 replies.
Last reply by CreatorMoon, over 7 years ago:
Sorry, the "exact same appearance" thing was weird. It works now, thanks!
Problems with LineOfSight Method
By LobsterL, with 6 replies.
Last reply by Super_Hippo, over 7 years ago:
You create two objects of Army1 and Army2. Each. And you pass the ones to the LineOfSight object which aren't added to the world. Remove the prepare method and add army1 and army2 to the world that you create in line 5 and 6.
Act delay for method not working
By ShatteredAsh, with 3 replies.
Last reply by danpost, over 7 years ago:
ShatteredAsh wrote...
Line 25 is because I want to announce a win or loss to my players. My only other idea would be to place a 600x400 image centered in my world announcing it, but placing images gives me problems lol
Not sure why you mention this. I was not saying to remove line 25 or anything like that.
setting koordinates problem
By plsFast, with 3 replies.
Last reply by danpost, over 7 years ago:
This does the same: <Code Omitted>
Making buttons change worlds depending on the image
By Erasedsword, with 3 replies.
Last reply by danpost, over 7 years ago:
I think the problem is that the level counter is always initially one every time you create a new
Levels
object. I do not think it to be a very simple fix. Maybe you should take a look at my
Super Level Support Class Demo
scenario. It might lead you in the right direction.
Method head
By plsFast, with 3 replies.
Last reply by danpost, over 7 years ago:
plsFast wrote...
but i want the input to be limited because i only need numbers from 1-7 and the method doesnt work because u could pick 8 or so
<Code Omitted>
need help fast
By plsFast, with 3 replies.
Last reply by Super_Hippo, over 7 years ago:
They open this discussion instead of the real one which isn't helping you at all.
201
202
203
204
205
206
207
X