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
Two accounts on same e-mail
By KSH-Aeppli, with 1 reply.
Replied to by Yehuda, over 8 years ago:
Why can't you try it and see what happens?
Transferring Variables from one world to the next...
By Shade1177, with 22 replies.
Last reply by Yehuda, over 8 years ago:
ARAVINDKUMAR wrote...
Please teach me programing
See
here
and
here
.
Enemy Actor which increases and decreases its size (loop)
By TheWaffelmeister, with 3 replies.
Last reply by danpost, over 8 years ago:
TheWaffelmeister wrote...
I want a smooth transition between a min and max value so that the enemy actor is able to expand and shrink (it's non-moving, just an obstacle)
Then, because multiple scaling will distort an image, you will need to keep the original image in a field; plus, you will need an int field to "time" the phases of expanding and shrinking. The value of the timer field can both regulate the speed and direction of change (expanding or shrinking). Always create a new image by copying the original image and then scale it to some new value. Basic codes would be:
Make a button that is affected by the state of another actor in the game
By 20silvan, with no replies.
so I'm trying to make a pokemon like game for my programming class and I need help with this, I want to make it so based on the health of the other pokemon the attack will do different amount of damage/lower the other pokemon's health even further so in the case that I attack and then attack again I won't only be able to set the pokemon's health to only 2 options, I have 3, full health, half health, and low health, I need help so I can set the image to low health when I choose an attack and the enemy is at half health it won't just set it to half again and just sets it to low because the enemy's health is already half, thanks for any possible help :)
java.lang.NullPointerException error
By Riyo, with 2 replies.
Last reply by Riyo, over 8 years ago:
Thanks, managed to sort the errors out and now can continue finishing off the game.
How do I make shot delays?
By Prox276, with 4 replies.
Last reply by Prox276, over 8 years ago:
Thank you! Now it works.
Help With Maintaining a Variable Please
By WarRudd, with 5 replies.
Last reply by WarRudd, over 8 years ago:
Thanks Danpost it worked great
Adding actors in the world that a PIP is in from an actor inside of the PIP
By Lavenger, with 7 replies.
Last reply by danpost, over 8 years ago:
Lavenger wrote...
danpost wrote...
Did you create a DoMe (as I called it) class? if not, do so; if you did, show what you created.
i did, but it says null pointer exception at line 91 << Code Omitted >>
Okay -- modify it to this: <Code Omitted>
File too big
By Heet_Patel, with 1 reply.
Replied to by Agent40, over 8 years ago:
As far as I know, Greenfoot doesn't update a Scenario because a file is too big. My current project is 110MB and I know people who have 600 and 900MB projects. The only thing I could assume from this would be to say that maybe the folder in which the scenario is saved has become corrupted and is reverting itself every time you make a save.
Hi I recently created a health and a score counter in my game but one of them keeps increasing by 4 and the other by 1. I only want them to increase by 1, please help
By an123, with 18 replies.
Last reply by Heet_Patel, over 8 years ago:
So basically add line 12, line 21, line 22, line 25, line 26, line 27, line 28
How do i show a health bar on an enemy?
By KitKat_KVIII, with 1 reply.
Replied to by danpost, over 8 years ago:
KitKat_KVIII wrote...
I was wondering whether it was possible for an enemy to have a health bar attached to its image so that it follows it around screen?
Have each enemy create its own health bar and use (override) the addedToWorld method so that they can add the bar into the world. Have each enemy control the value and the position of its own health bar. You can add an act method to the health bar to remove itself from the world when zeroed. The enemy can remove itself when its health bar is found not to be in the world.
Help with counter
By TupTup98, with 1 reply.
Replied to by danpost, over 8 years ago:
In bevælgelsemedpiltaster class, at end of bevælgelsemedpiltaster method: <Code Omitted>The reason for the last line is that you create 3 different counters in your
MyWorld
class code -- (1) line 17 creates a
Counter
object that you named
counter
which, as
static
, belongs to the class itself (not the world); (2) line 18 creates a
Cou
Learning programing
By ARAVINDKUMAR, with 2 replies.
Last reply by danpost, over 8 years ago:
Please remove (destroy) your post
here
.
raising speed by score
By intanmuliawati, with 1 reply.
Replied to by danpost, over 8 years ago:
intanmuliawati wrote...
I have a counter class to calculate the score. How to increase the number of enemy when the score reaches a multiple of 15?
Currently, you are creating an enemy after every 150 act steps. To increase the spawn rate, you would lower that number. If the score is to be what determines how much to lower that number, then you would need to subtract some expression of the score from it. You would need to consider what multiple of (score/15) to lessen it by. What value you choose will effect the game duration as well as what possible maximum score may be achieved.
How do I reference an array?
By Astralman, with 7 replies.
Last reply by Astralman, over 8 years ago:
Got it. Thanks!
257
258
259
260
261
262
263
X