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
BlackJack
By drummerboy619, with 11 replies.
Last reply by danpost, over 11 years ago:
drummerboy619 wrote...
But I need to keep the values and information about the cards from lines 21 to 201 correct?
All the information on those lines has already been taken care of in the constructor of the class I gave. The fields 'suit', 'face' and 'value' will be set to the appropriate values when the card is created. They will hold, for an example, when 'new Card(11)' is executed: id = 11; suit = "club"; face = "queen"; value = 10; and the 'front' field will hold the face up image for that card; the 'back' field holds the face down image for ALL the cards (you may need to adjust
Error: 'Reached End Of File While Parsing'
By LamboCreeper, with 1 reply.
Replied to by lordhershey, over 11 years ago:
you are missing a '}' character - it should be on line 11.
How to remove my arrow?
By GuilhermeGomes, with 4 replies.
Last reply by GuilhermeGomes, over 11 years ago:
You're right thank you! I'll upload my game as soon as i get it done
Greenfoot Help THANKS!
By werdnail, with 3 replies.
Last reply by danpost, over 11 years ago:
In your 'run' method, the last part should be something like this: <Code Omitted>Of course, 'addLeaf' and 'recordLap' will need to be adjusted (as I gave it just as an example of what it would look like).
Problem with int
By Toiwing, with 1 reply.
Replied to by danpost, over 11 years ago:
Line 30 creates a local variable with the name 'paukku' that holds a Paukku object. You cannot assign it a value of '1'. If you want to refer to your int field at that point, you need to refer to it as 'this.paukku': <Code Omitted>
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 11 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 11 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 11 years ago:
ahh, thank you very much. now it works.
Path of the object
By Wolfieee, with 1 reply.
Replied to by danpost, over 11 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 11 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 11 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 11 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 11 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 11 years ago:
587
588
589
590
591
592
593
X