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
Keeping best score on an EXCEL file
By frequency, with 1 reply.
Replied to by danpost, almost 8 years ago:
frequency wrote...
Based upon this scenario http://www.greenfoot.org/scenarios/20781 How can i tell greenfoot to write down the best scores to an EXCEL file? Thank you!!
Locally, the UserInfo class stores data to a 'csv' file which Excel opens and works with. On the site, data is stored to a database on another server.
Turning off world boundaries?
By RynoCoder, with 1 reply.
Replied to by danpost, almost 8 years ago:
Use the alternate
World constructor
.
Problem with score reset after greenfoot game resets
By frequency, with 11 replies.
Last reply by frequency, almost 8 years ago:
FIXED!
Separate scoreboard and timer for 3 classes
By frequency, with 37 replies.
Last reply by frequency, almost 8 years ago:
I actually made it before 2-3 hours.Thanks,i will post new stuff
Distance Comparisons
By SuperNinja, with 1 reply.
Replied to by danpost, almost 8 years ago:
SuperNinja wrote...
Is there a way I can compare distance so I can give the dart a target based of that instead of only targeting one actor or the other?
By "based on that", do you mean by which one is closer? Does your World subclass keep references on the players? Will both players always be in the world? What are the class names involved? Show code for class of dart.
How can i make an image change when i press a button
By frequency, with 19 replies.
Last reply by frequency, almost 8 years ago:
I MADE IT! DAMN I AM SO HAPPY MAN! Take a look. http://www.greenfoot.org/scenarios/20778 Now i must make it reset the score and fix the count down timer!
How to make 3 different timers for 3 different game modes
By frequency, with 6 replies.
Last reply by frequency, almost 8 years ago:
Done,removed the images and now they extend from actor. Now what do i do?
HELP!!!!
By Indy5Drew, with 3 replies.
Last reply by danpost, almost 8 years ago:
First, you need some kind of list to hold the key sequence (probably a character array, aka: a String object, would do nicely). Then, you need an int to track the progress of the playing of the sequence. When the sequence is to start, set the int field to the length of the sequence. This way, when the int field is zero, the sequence is not playing and when it is not, the sequence is playing. When the int field is greater than zero and either the field value equals the length of the sequence or the current note is not playing, (call a method to) play the note and decrease the int field (no
Cant add proper scoreboard !
By frequency, with 3 replies.
Last reply by frequency, almost 8 years ago:
I uploaded new topics with the scenario!
Variable and Points
By Cett, with 4 replies.
Last reply by Cett, almost 8 years ago:
oh my god that's so simple. Thank you so much!
Heap space after a few level restarts
By Paul12345, with 33 replies.
Last reply by Paul12345, almost 8 years ago:
Now even if i use my old big world i still get no memory issue
Stopping and playing music
By Heet_Patel, with 9 replies.
Last reply by danpost, almost 8 years ago:
Heet_Patel wrote...
thanks though. and do you have a youtube channel on coding for greenfoot
No -- just the two tutorials uploaded here. Most of your other recent posts were answered by my last post (without code -- but quite straightforward). The walls also can be set when you save the world.
[Help Needed :)] Changing the Actor target of a troop
By Arakniode, with 4 replies.
Last reply by danpost, almost 8 years ago:
Arakniode wrote...
does that mean that when I remove the resource with getWorld().removeObject(this);, the resource
still exists
, but is not in the world?
As long as a valid reference exists on the object, it will not go to the gc. The field 'currentTarget' references the actor (even if removed from the world). Think of when you create an object, before it is added to the world. It must remain or you would never be able to do anything with it. The only thing removing it from the world does is (1) remove its reference from the list of actors the World object keeps; and (2) set
back to main board - question
By divinity, with 2 replies.
Last reply by divinity, almost 8 years ago:
probably idk hence the reason why i ask,
Greenfoot.ask() causing number format exception (null)
By temch55, with 1 reply.
Replied to by danpost, almost 8 years ago:
That is crazy, because for the last half hour or so I was working with just that -- using Greenfoot.ask in a constructor. I had not come across any issues with it; however, I have not yet closed out and opened it again. It may just be that without some world already having been created, it has no width to place the text in, thereby disallowing it. I say this because I did change my world to a (1, 1, 1) size and it did set the input box to the previous width size. I am glad you came across this because I was about to inform someone else that it would actually be possible, where this proves
290
291
292
293
294
295
296
X