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
Rain drop game, removing objects that fall to the ground
By Akimb, with 17 replies.
Last reply by Akimb, over 11 years ago:
Works now, thanks. :)
Strange lag?
By Unicus, with 7 replies.
Last reply by Unicus, over 11 years ago:
The lag is gone now; If I change the code to the second one, it keeps removing and adding the object gameover, so I guess I'll leave it as it is. It no longer fills my memory, so it's ok. I just published the game (beta version still), so if you want to take a look, you can find it here:
http://www.greenfoot.org/scenarios/11355
adding a shield
By davemib123, with 31 replies.
Last reply by GamesGrinder1998, over 11 years ago:
vonmeth wrote...
Add checks for that boolean. If that boolean is true, don't let certain things happen (like take a hit). For example to make it so enemy fire doesn't harm your Hero. First make your boolean shieldActive static.
Can't get powerup to appear on screen
By GamesGrinder1998, with 34 replies.
Last reply by GamesGrinder1998, over 11 years ago:
danpost wrote...
GamesGrinder1998 wrote...
danpost wrote...
With a 'lifespan' of 400, maybe about 7 to 8 seconds, if your scenario is running at normal speeds (about midway on the speed slider).
ok, if i want to implement a shield powerup, can i just use setImage a new image if a fireball collects it and then the shield starfighter can just eat the enemies bullet, if so, what could the code look like
It would make more sense to have a separate actor for the shield. The starfighter object should have a field to reference it when it is active (null when not). If the collision code
Wondering about efficiency.
By avatarcolin, with 4 replies.
Last reply by avatarcolin, over 11 years ago:
Oh! Thanks, didn't realize it was.
Having some problems with removeObject.
By Than4tos, with 8 replies.
Last reply by Than4tos, over 11 years ago:
Thank's alot m8
seems to be working as i wanted it.
Background music for multiple levels
By Rubric94, with 7 replies.
Last reply by Rubric94, over 11 years ago:
problem with file itself, will fix
exercise 6.1
By Jaimie, with 11 replies.
Last reply by danpost, over 11 years ago:
You will probably need to use 'new java.util.Vector(2.2, 3.1)' (if you are using the java.util.Vector class); or, 'new Vector(2.2, 3.1)' if you are using your own Vector class.
Can I have some help explaining this?
By 327458, with 1 reply.
Replied to by danpost, over 11 years ago:
Let us break it down: We are using a for loop to iterates through a collection of object. This collection is created by calling 'getWorld().getObjects(Pins.class)'. 'getWorld()' (Actor class method) returns the world that the actor, referred to by 'this', is in. 'getObjects' (World class method) returns a list of objects of the specified class (Pins.class) Each iteration will set 'obj' to a different Pins object that is in the world. The 'obj' variable holds a reference to an Object type object. '(Pins) obj' on line 3 casts the referenced object as a type of Pins object. It is then ass
Help with mouse info
By bizzard, with 16 replies.
Last reply by danpost, over 11 years ago:
'ba.ll.getImage().getWidth()'. Outside the Ball class, 'ball' will have to be assigned a Ball object; inside the ball class, you can just drop the 'ball.' part.
power ups?
By programmer22, with 127 replies.
Last reply by GamesGrinder1998, over 11 years ago:
danpost wrote...
Which class of Actor is this enemy that isn't respawning in the players 1 box ? and, is it not spawning at all or spawning in the players 2 box?
it's spawning in the players 2 box when my starfighter 2 shoots an enemy but when my starfighter1 shoots it, it doesn't respawn
Text with background
By Unicus, with 2 replies.
Last reply by Unicus, over 11 years ago:
Thank you very much! (again)
How does the move() Greenfoot method calculate where to move the player?
By Entity1037, with 3 replies.
Last reply by Entity1037, over 11 years ago:
Ah, I totally forgot about trigonometry! Thank you!
Bullet is deleting itself before an enemy can detect it
By mcGreen, with 13 replies.
Last reply by mcGreen, over 11 years ago:
That did the trick! Indeed there was a tag on it. Somehow its now too large to upload it. Edit: Tried again and it suddenly works... strange. Anyway, only thing I need now are enemies who can run around from left to right.. I would like them to lets say, walk 3m in one direction, then stop, and then walk 3m in the other direction. Other than that the game is pretty much finished Another question: Why do the Sprites glitch like that?
My final project in greenfoot(records)
By Apifobia, with 1 reply.
Replied to by Apifobia, over 11 years ago:
[Disallowed URL] here a class diagram of the project i believe it will be very different when i implement it in code, plus im still not familiar with greenfoot to see if it is actually effective but its the advance i have
695
696
697
698
699
700
701
X