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
Game lagging when touching a certain object
By Gbasire, with 11 replies.
Last reply by Gbasire, over 4 years ago:
You're right, so I don't know what to do right now. Adding an object seems to make the game lag for some reason.
Calling a Bar method from another actor class
By hernry2812, with 9 replies.
Last reply by danpost, over 4 years ago:
You color list is not as I have given above. Should be red, red and yellow (for 0, 1, and 2, respectively). And if it changes color at all and the size of the bar does not change, I can only presume you made unauthorized changes to the
Bar
class.
I cant run my game in JAVA or HTML
By Danyboy910, with 1 reply.
Replied to by danpost, over 4 years ago:
Danyboy910 wrote...
When I try to export my game in java and i get the .jar file, it says
"Error: A JNI errar has ocurred, please check your installation and try again".
When I export it to this website, it says
"There is no HTML 5 translation of this scenario available."
,
Main problem is conversion failure due to use of the
javax.swing
package, You must not use it.
Issues making cookie clicker
By superDumb, with 4 replies.
Last reply by superDumb, over 4 years ago:
Answer to my problem : Things are put down in layers I apparently had my cookie behind an invisible wall that was from a png I had put in just put my cookie as the last object added into the game and it works as intended.
Carrying a variable value over worlds?
By CreatorMoon, with 4 replies.
Last reply by CreatorMoon, over 4 years ago:
I've got it working. Thanks for the help guys!
Can't stop music from the World itself or an actor
By hernry2812, with 2 replies.
Last reply by danpost, over 4 years ago:
Remove the declaring type "
GreenfootSound
" from the beginning of line 35 so you do not create a local variable.
Best way to use a text displayer with time ?
By Gbasire, with 2 replies.
Last reply by danpost, over 4 years ago:
Put
String
objects in an array and introduce an
int
index pointer. Run timer from 100 to 0 multiple times. Use image of actor to display text: To make class reusable, bring text lines in by way of a parameter of the constructor. The constructor can also initialize the image to first line of text. Like this:
Using custom .ttf files to create a font
By Hull, with no replies.
In my current project, I've run into the issue that not all versions of Windows have the same set of fonts. I intended to use the "Alien Encounters" font, which doesn't seem present on the machines of the people working on this project with me (and my second PC). After doing a small deep dive, I've come across the fonts folder in Windows and reinstalled my version of Alien Encounters, for testing purposes. Ever since that, it's also broken on my PC. By broken, I mean not properly displayed: <Image Omitted> It's fixed by installing the .ttf for all users on the given device. However, one would have to somehow tell every user of the project to install the font. I don't want that, it's clumsy and seems inconsistent. So my question would be, is there a decent way to create an awt.Font off of a .ttf file within the same directory as the project, and convert that font to a Greenfoot font? That way, I could just ship the project with the appropriate .ttf and not worry about the local system.
Name of an object
By teachopp, with 1 reply.
Replied to by danpost, over 4 years ago:
teachopp wrote...
Now there would be displayes "Object: Object"
What would display if you inspect a second object of the same type (at the same time)?
large list of attributes
Please list several of these attributes and specify the type of object being inspected
Using a variable in place of a class name in a method
By FirewolfTheBrave, with 2 replies.
Last reply by FirewolfTheBrave, over 4 years ago:
I did need to do an additional typecasting in your second line (bc Object != Actor), but overall, it worked. Thank you!
How can I get the active world in the actor class?
By Leon137, with 4 replies.
Last reply by danpost, over 4 years ago:
There is also: <Code Omitted>
How to reference scrolled Coordinates from actor class
By hernry2812, with 1 reply.
Replied to by danpost, over 4 years ago:
hernry2812 wrote...
I set every method in SWorld to public, but I still can't use them to set my main actor to the location I want.
The SWorld class is not to be modified. You can use "((SWorld)getWorld()).getScrolledX()" and similar for y.
Play an animation for a short time after touching another Actor
By hernry2812, with 4 replies.
Last reply by hernry2812, over 4 years ago:
Okay, thanks^^
Music
By Roshan123, with 14 replies.
Last reply by danpost, over 4 years ago:
Roshan123 wrote...
I have to find another way to fix it
I would first comment out all of your
while
and
do
loops. If it clears up, you can start, one by one, reinstating each block to find which one(s) cause the problem. If it didn't clear up, then start commenting out more and more until it does. That should give you an idea of where to look and what might be going on.
Flip the animation after the actor hit the border
By Leon137, with 9 replies.
Last reply by danpost, over 4 years ago:
Leon137 wrote...
Now its working perfect, thank you very much for your help.
You can now also remove lines 16, 17 and 27.
76
77
78
79
80
81
82
X