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
Help with J Option pane
By Mitchell.School, with 4 replies.
Last reply by danpost, over 1 year ago:
Mitchell.School wrote...
still repeats itself even if i enter 1-3 which is weird because the squareValue input works and this one works if i have it be triggered by pressing a key << Code Omitted >> because that works but the other one doesn't
The code provided by myself was tested before posting. I am quite sure it, by itself, is not the problem. Please show your updated code.
I wanna make an electric effect that stuns animals that touch it for a few seconds
By KCee, with 3 replies.
Last reply by danpost, over 1 year ago:
KCee wrote...
how would i make the animal stay in place? would i put (speed = 0) under health--;?
I thought I took care of that with line 12. However, it seems to be misplaced. Move line 12 two lines down to have lines 6 through 15 look like this: <Code Omitted>As long as the provided code is placed in the act method before the movement code, It should now work as required.
I have a poison trap that I want to deal tick damage (damage overtime)
By KCee, with 6 replies.
Last reply by danpost, over 1 year ago:
KCee wrote...
wait does the poison only deal damage while the animal is in contact with it or does it deal damage even after its left contact? because i want the animal to be poisoned even after leaving contact with the poison cloud
If being poisoned is to be a state of an animal, then the damage should be controlled by the animal, not by the poison object. So, forget everything I stated above. In
Animal
class, add:
Published my first scenario, but now it is stuck on initializing
By Merten, with 5 replies.
Last reply by danpost, over 1 year ago:
Merten wrote...
<< Codes Omitted >>
You posted all these classes (excepting
Speler
and
Sline_Koning
) for what reason? I cannot be certain, but it might be the use of the
GifImage
class that is causing problems on the site.
I want to assign multiple keys for movement, A and Left Key What would be the code for that ?
By TheGoatFighter, with 2 replies.
Last reply by danpost, over 1 year ago:
TheGoatFighter wrote...
<Code Omitted>It is showing an error and that I can't use &&
Of course not. Only
boolean
values (
true
/
false
) can be
#AND#
ed (using '&&') Also, you do not want the actor to move only if both keys are pressed at the same time. You want "if either key is down", which means you need to
#OR#
('||') the
boolean
values: <Code Omitted>
How to switch images slowly?
By UAT123, with 3 replies.
Last reply by danpost, over 1 year ago:
UAT123 wrote...
Thanks for replying but the image doesn't switch when the food is eaten. I wonder if it has anything to do with this bit of the code: << Code Omitted >>
No. That code should be fine. Please present your current class codes in full.
Can sombody tell me why the game does not work in the second space world?
By stijn.b, with 5 replies.
Last reply by danpost, over 1 year ago:
One way to "fix" it is as follows (in
Shot
class): <Code Omitted>Although there is probably an easier way -- like having an intermediate class between
World
and the two space worlds (maybe
Can sombody tell me why the game does not work in the second space world?
By stijn.b, with 14 replies.
Last reply by danpost, over 1 year ago:
stijn.b wrote...
<< Codes Omitted >>
What about the
Space2
class code?
How to make a loot dropping system with chance attached to it
By Deepfist, with 2 replies.
Last reply by Deepfist, over 1 year ago:
Ok thx, didn't know that getRandomNumber also worked like that so that's my bad
How can i invert this code
By Hhe, with 2 replies.
Last reply by Hhe, over 1 year ago:
OMG youre right
Greenfoot uploading old version of my game
By BigCakeTwo, with 1 reply.
Replied to by danpost, over 1 year ago:
BigCakeTwo wrote...
I have tried to upload a scenario to this website however when I launch the scenario on its page it plays an older version, which loads into a test scene I used while developing the game. I have tried deleting the test scene from the scenario project files before uploading it and uploading it under a new name but the scenario still loads into the deleted test scene instead of the actual game. Is there some way to fix this problem or is my project just broken?
If deleting the files by way of file directory actions, you need to delete ALL 3 files related to the test sc
I wanna play an explosion animation using 14 images i have of the explosion
By KCee, with 7 replies.
Last reply by danpost, over 1 year ago:
KCee wrote...
How do i make the animations play out faster? I tried manipulating the numbers in setImage but its giving me errors like << Error Trace Omitted >> << Code Omitted >>
The number that needs changed appears several times in the
setImage
method. Also, it should probably be a constant for the
Explosion
class: <Code Omitted>Your
setImage
method can then be modified to this:
How to make a damage and kill system with one bullet and multiple different health values for actors
By Deepfist, with 8 replies.
Last reply by Deepfist, over 1 year ago:
Well that was easier than expected, thx
Make image only flip once
By TanishStIves, with 10 replies.
Last reply by TheGoatFighter, over 1 year ago:
Naaaa Yototrth
How to remove Bullet from world
By RandomGuy, with 81 replies.
Last reply by TheGoatFighter, over 1 year ago:
The goat wrote...
if(isAtEdge()) { getWorld().removeObject(this); }
There you go, ask help from me, not danpost, i the goat
17
18
19
20
21
22
23
X