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
how would i create an openable door
By Weeb.exe, with 85 replies.
Last reply by Weeb2.exe, about 6 years ago:
Oh My God! IT WORKED YESSSSSS THANK YOU SO MUCH you are awesome dan thank you so much for helping
Greenfoot Scenario in Netbeans
By aksi12uhr, with no replies.
Has anyone managed to run Greenfoot Scenarios in Netbeans? This used to work by calling the main-Method of
greenfoot.export.GreenfootScenarioMain
method and passing scenario name, name of world class and path to greenfoot-labels as parameters. One way was to configure your IDE as documented on https://www.greenfoot.org/doc/running_on_netbeans. I preferred using a simple starter class to pass the parameters <Code Omitted>Both ways worked fine until GF 3.5 Since version 3.6 Greenfoot 3.6 uses JavaFX and the class
greenfoot.export.GreenfootScenarioApplication
does not have a main-method any more. Does anyone know a working solution for GF versions 3.6?
how to download older scenario
By Roshan123, with 2 replies.
Last reply by Roshan123, about 6 years ago:
thanks for reply
Left & Right facing images
By genju, with 15 replies.
Last reply by danpost, about 6 years ago:
I think if you renamed your
setImg
method more appropriately (like to, say,
loadImages
), you might see one problem. Let me point out that this particular method is invoked exactly one time, from the constructor of the class. The attack images will certainly not load if you apply conditions above and beyond what is required (what does "with enemy" have to do with what images are loaded --the
boolean
is always
false
during constructing anyway). You just need to load all images for
Blue
or all images for
Red
; then set the initial image for the actor.
Removing objects
By scaps, with 7 replies.
Last reply by scaps, about 6 years ago:
alright it worked thanks a billion
How can i get the height and width of an object in another class?
By cantmember, with 1 reply.
Replied to by danpost, about 6 years ago:
Enemy
is a
Class
name (or a
Type
). A class does not have an image. Instances created from the class do. Use
getOneIntersectingObject
to obtain a reference to the "seen"
Enemy
instance.
Continuation: accessing integers in other classes
By scaps, with 4 replies.
Last reply by scaps, about 6 years ago:
it worked thanks a million
Neat way of getting a character at a specific index?
By 444Jam444, with 2 replies.
Last reply by 444Jam444, about 6 years ago:
Thanks.
The "if" statement is not working this instance
By Top_Gerald, with 4 replies.
Last reply by Top_Gerald, about 6 years ago:
Thank you danpost for the comprehensive reply! Also, thanks Jarvissss for the attempt. I managed to get the code working by putting a "public void act()" into my world class and putting the "sourceSpawn" in there.
Need help with static method
By Shabaz616, with 2 replies.
Last reply by danpost, about 6 years ago:
MyWorld
is a
Class
name and only shares its name as the type of objects it creates. In general (that is, without specifically programmed restrictions), a class can create multiple objects. Given two worlds: <Code Omitted>The use of the
Class
name (or
Type
of object) is not sufficient to distinguish what world instance you might, say, want the width of.
How do i create a scenario?
By Spuddy34, with 6 replies.
Last reply by Spuddy34, about 6 years ago:
thanks
Accessing an integer from another class
By scaps, with 6 replies.
Last reply by scaps, about 6 years ago:
I went ahead and moved integer zombieskilled to MyWorld.
Once I add the this while loop the world never loads... help!
By Smizi, with 2 replies.
Last reply by Smizi, about 6 years ago:
thank you so much! I totally forgot about that
How do i make a simple memory card game?
By JollyGreenGiant, with 223 replies.
Last reply by danpost, about 6 years ago:
"&" is not an operator that compares. And you cannot compare a card (firstPicked) to a value (secondPicked.getValue()).
Remove objects using world class
By scrap69, with 11 replies.
Last reply by danpost, about 6 years ago:
scrap69 wrote...
do you know if it's possible to have the showText method have text in different colors?
I do not believe you can alter how
showText
displays the text. Please refer to my
Value Display Tutorial
scenario.
124
125
126
127
128
129
130
X