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 to check if Card is deployed?
By ProfessionalNoob, with no replies.
I am wondering how to check if a certain card has been "deployed" on a board. On my card class, I have this: <Code Omitted> On my player class, I have this: <Code Omitted> What happens is that if a player drags a card into the field, it gets "deployed". I want to reduce the CurrentMana variable by a certain amount depending on the cost of the card. Can anyone please tell me how to do it?
How do add GIFs on Greenfoot ?
By 1920, with 1 reply.
Replied to by danpost, over 10 years ago:
Import the image files into your project. You can right-click on any class icon and select 'setImage.'; then, import the file from your file directory into the project. Afterwards. you can reset the image of the class as needed. Once the image files are in the images folder of your project, which is where importing the file will copy them to, you can then use them in your project. I am aware I explained it in a bit of an awkward way; but, I cannot know whether you have separate classes for WinScreen and LoseScreen, which you can 'setImage' to immediately upon the import or not.
Greenfoot dungeon game tutorial Help!
By werdna1990, with 2 replies.
Last reply by danpost, over 10 years ago:
werdna1990 wrote...
its okay im a fool all i had to do was change one word
Is this like supposed to be a riddle? My guess is the word immediately following the word 'extends' and it was not in the class given above. More precisely, 'Desert' was changed to 'World'.
Healthbar doesn't decrease
By SalatgurkenJoe, with 4 replies.
Last reply by SalatgurkenJoe, over 10 years ago:
ahh, thank you very much. now it works.
Path of the object
By Wolfieee, with 1 reply.
Replied to by danpost, over 10 years ago:
Seeing what is happening is not the same as looking at HOW it is happening. This is more important, especially when lag is involved. You should show the code being used to draw (or put) the dots or lines behind the actor. Use the 'code' link below the 'Post a reply' content box to insert code into your posts. The two main ways of producing trails are as follows: (1) draw the trail on the background of the world; this is okay if the trail is permanent and does not fade away; my
Crayon Babies: A World Changing Demo
scenario has an exampl
Encapsulation only returns the value of a private variable one time????
By Fábio, with 1 reply.
Replied to by danpost, over 10 years ago:
Meanwhile in the Bear class I've created a new object from MovableBrick class that allows to access to the public methods inside the MovableBrick Class
This is the problem. You are creating a new MovableBrick object that has initial values for its fields. The 'xPosition' field will be '2' and remain '2' until it is placed into the world and 'beats in something'. You need to get the 'xPosition' value from the MovableBrick object that is already in the world -- the one that the bear is actually on. You can use 'getOneObjectAtOffset' to determine if on one and cast the Actor o
Object interaction
By johansj, with 2 replies.
Last reply by johansj, over 10 years ago:
Hi there, yes Snake is a subclass of Wombat. I changed it and now it works, cheers Super Hippo
Triangles in the corners of the screen
By amber_757, with 1 reply.
Replied to by danpost, over 10 years ago:
Easier would be to use the 'fillPolygon' method: <Code Omitted>The first set of integers are the x-coordinates of the three points of the triangle (polygon) and the second set are the y-coordinates. The coordinates of each point are at the same index within the two arrays. So, here the points are ( 0, 0 ), ( 90, 0 ) and ( 0, 90 ). Do the same using the coordinates of the 3 points for each corner.
Strange problem with returning integer
By ProfessionalNoob, with 2 replies.
Last reply by danpost, over 10 years ago:
Easier would be to use static fields for the images and values and just have the Card class create each specific card as needed:
Box moving problem
By EduandErnst, with 13 replies.
Last reply by danpost, over 10 years ago:
Call Dll in Java
By CooliMC, with 7 replies.
Last reply by CooliMC, over 10 years ago:
thx to both but i need to delay the input for the whole system not only greenfoot so i need to call a varible from the dll but thx to both :D
Executable jar appearance
By pettevi, with no replies.
After running the Share... / Application I get executable jar file that runs my game in a Java window. Is it possible to change or modify the appearance of the application window? Changing the look'n'feel can be done on command line with <Code Omitted> but can I remove the Reset and Run buttons, set the window centered in the screen or run the game automatically? Is there a setting or a switch for such. BR, pettevi
Help! JComboBox and JCheckBox
By riachiyo, with 1 reply.
Replied to by danpost, over 10 years ago:
This should work. Change the 'itemStateChanged' method to this: <Code Omitted>Appending the following to your 'actionPerformed' method should solve the rest:
getActorAtOffset method?
By Holladerwaldelf, with 2 replies.
Last reply by Holladerwaldelf, over 10 years ago:
thanks a lot! now it works.
Greenfoot Background error
By biferony, with 2 replies.
Last reply by biferony, over 10 years ago:
danpost wrote...
Double-check the spelling (including capitalization) on your file names (including suffixes). The properties of the file should show the exact suffix.
Thanks! I had the first letters capitalized in the code, but not in the files so I didn't notice.
585
586
587
588
589
590
591
X