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
Using getOneObjectAtOffset() in Greeps scenario
By edik_192, with 3 replies.
Last reply by edik_192, over 9 years ago:
Thank you I need just the values (
0
,
0
)
Danpost Plz
By jmsmall, with 3 replies.
Last reply by danpost, over 9 years ago:
jmsmall wrote...
Hopefully you can help.
This is not the code you are having problems with. The code you are having problems with is probably in the class of your scrolling actor or elsewhere in your world class. The Background class has the shift method and some fields that are referred to in the class of your scrolling actor.
Drift
By Ragnar, with 5 replies.
Last reply by Ragnar, over 9 years ago:
Nvm, my friend figured it out. Just added setRotation(0) after move(3);
Frogger Game-Delaying movement
By CuddlySpartan, with 1 reply.
Replied to by danpost, over 9 years ago:
Using thread sleeping or greenfoot delaying will cause the entire project to "pause" for the given time. You either need to move the speed slider to a lower settting or use timers within the project to control the speed.
Basic point system?
By Armac290, with 1 reply.
Replied to by danpost, over 9 years ago:
Armac290 wrote...
I was wondering if anyone could show me a way to make a basic point scoring system with a display.
That is discussed in my
Value Display Tutorial
scenario. Take a look.
MouseObject help
By Walker, with 1 reply.
Replied to by danpost, over 9 years ago:
The action you require, which you represent (as code that will not compile) from line 16 through 19 is better off placed in the Gaster class act method. The reason is does not compile is that the Greenfoot class method 'mouseClicked' requires an object of type World or Actor (or 'null' if none is to be specified -- or, if the click can be anywhere). You cannot click on a class; you click on objects. In the Gaster class, you can use 'this' as the object: <Code Omitted>
Counter Help
By carter, with 1 reply.
Replied to by danpost, over 9 years ago:
carter wrote...
I am making a card game and I need a counter to count how many cards have been flipped. I have 4 cards on the screen and will have more on other levels. I have no idea how to make a counter or how to use one so please explain carefully as I am a new coder.
My
Value Display Tutorial
scenario can give you pointers on this subject.
Relationships between actors
By Itta, with 1 reply.
Replied to by danpost, over 9 years ago:
You could have Ykey move left, check for Hiro and move back, then perform any action needed if Hiro was there: <Code Omitted>
The GreenfootSound API method of sound.stop(); is not working for me
By LaughingArcher42, with 2 replies.
Last reply by LaughingArcher42, over 9 years ago:
Thank you for the help! Making the sound static was all I needed to do :)
Problem with IsKeyDown() and backgrounds
By M8R1X, with 1 reply.
Replied to by danpost, over 9 years ago:
The 'while' loop, lines 46 through 55 appears to be an infinite loop. The condition, 'true', will obviously never be 'false' and there are no 'break' statements within the block to break out of the loop.
Problem in implementing Starting Menu
By Nagogi, with 1 reply.
Replied to by danpost, over 9 years ago:
The main problem is where you placed the lines 9 through 13 in the Level101 class. The block of code, lines 3 through 16 is called the constructor of the Level101 class. It is executed one time per object created from the class -- or, once, when your Level101 world is created. The menu will certainly not be in the state of "is done" at the time it is being adding it into the world -- and since the code (lines 3 through 16) will NEVER execute again for that particular Level101 world object, lines 11 and 12 will never be executed. The lines 9 through 13 need to be somewhere where the code wi
creating a guided game about computer parts for kids
By uncfan44, with 14 replies.
Last reply by uncfan44, over 9 years ago:
didnt know the empty act method would over ride something in compparts, fixed it and everything works fine, just need to move and resize to clean up the looks! you are the man sir!
Remove multiple objects after one has been clicked
By jakeIon, with 1 reply.
Replied to by danpost, over 9 years ago:
What class do the Scenario1, Scenario2 an Scenario3 classes extend?
jakeIon wrote...
The objects are titled: Scenario1, Scenario2, and Scenario3.
Actually, to clarify, the objects are not titled with those names -- the classes that these objects were created from are called by those names. You need to supply any object created from any class a name of your choosing for them to have names. Also, you must do so at the proper place to be usable at all the possible places you need them to be. Examples of giving objects names follows:
Add an object, and remove an object after a while
By carter, with 4 replies.
Last reply by danpost, over 9 years ago:
carter wrote...
I read that when you do the delay, it stops the whole program, and if that is true, I have other actions going on at this time
It does. If that is not an option, the you need a reference field for the Correct object and an int field to count out some act cycles before removing it:
Need help!!
By MLP, with 3 replies.
Last reply by danpost, over 9 years ago:
Xxmostwanted18xX wrote...
HI I AM STUCK ON CHAPTER 6 CAN YOU HELP ME
What is the issue you are having? and chapter 6 of which book/version? what code have you tried? Should start a new discussion thread so we do not have two issues competing against each other on the same discussion thread.
470
471
472
473
474
475
476
X