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
[RELEASE] Implementation of Cheat Codes in your Project
By xbLank, with 2 replies.
Last reply by xbLank, almost 8 years ago:
line 30: Should be "easteregg" ofcourse since we are calling lowercase.
CxVercility wrote...
You might not want to let this run in the background indefinitely, and entering it once should disable it after shouldn't it? Solid else.
Actually It is just running while you are in the main menu of your game. Besides this is just a sample. Ofcourse people can choose whether or not they want to let this run the whole time. In case you are planning to only implement one cheat code then ofcourse you can disable it after entering it once else that wouldnt make much sense. In the string check
Need Vector help!!!!
By johnguirgis, with 2 replies.
Last reply by danpost, almost 8 years ago:
A vector has a direction and a length. If you need to ADD a horizontal vector to it, use the 'addVector' method (or whatever method there is that adds a vector force to the current vector. If you need to remove any currently set vertical force, then you would need to determine that part of the vector and subtract that force from the vector. Cannot provide any more details without knowing exactly what you are trying to do and without knowing what your Vector class is capable of (show the entire class code).
High score System
By Dimak, with 38 replies.
Last reply by Dimak, almost 8 years ago:
Okay yep that works now. Thanks everyone for the help. ( I would not have passed this class without you guys )
Change world level when I reach a certain score
By nojamo66, with 2 replies.
Last reply by nojamo66, almost 8 years ago:
Sorry about that I’m just a newbie at java so I wasn’t sure what to do now I solved it.
일리아스 wrote...
I do not really understand the problem to be honest. What are you failing at? You didn't even show us what you have tried so far. Its like you want us to do all the work.
Save a variable in a World and use it in another one
By alexlohe25, with 2 replies.
Last reply by xbLank, almost 8 years ago:
We had this question at least 5 times in the past 2 weeks. Please use google.
Going from a subclass to another
By RipplyPear, with 2 replies.
Last reply by danpost, almost 8 years ago:
The variables 'number' and 'number2' are set to zero from the get-go. They are assigned their value by way of the 'getObjects/size' calls before any of the actors are placed into the world. Either set their values at the end of the 'prepare' metthod or in the constructor after the call to the 'prepare' method.
Getting Error - " Java heap space"
By Spicy0506, with 6 replies.
Last reply by danpost, almost 8 years ago:
Spicy0506 wrote...
I figured it out < Code Omitted > I had to change the "0 < amount" to "i < amount" simpler mistake
Simple, yet easy to miss (as apparent I had done). Sorry. Glad you found it.
login mysql error when program run
By divinity, with 1 reply.
Replied to by divinity, almost 8 years ago:
hi pple i got the program to work, i had set the setvisible to false instead of true apparently
Help me with my game creation."aa"
By frequency, with 5 replies.
Last reply by frequency, almost 8 years ago:
Thanks,i will!
changing worlds only when one box is pressed
By jacquelinereilly, with 1 reply.
Replied to by danpost, almost 8 years ago:
It might help if you pass the focus-able text objects to the MenuSelector object and put the key control in its class. Then, have the world test a 'selected' field, which is set to the focused text (or its index) when "enterr" is pressed, to proceed to the appropriate world.
Bullet Generator
By TheSlorrow44, with 2 replies.
Last reply by TheSlorrow44, almost 8 years ago:
danpost wrote...
First, unless there is a visual need to have the generator as an Actor object, it should not extend the Actor class. Second, better is to use int fields to track number of each type bullets and create each as needed, rather than creating a number of them for later use.
Thanks!!!
how to make the camera follow my game character
By JoyBajwa, with 1 reply.
Replied to by danpost, almost 8 years ago:
Please refer to my
Scrolling Tutorial
scenario.
Sum of array
By Super_Hippo, with 3 replies.
Last reply by danpost, almost 8 years ago:
Actually, the binary equivalent to 0.4 above was incorrect; but, my point still holds. The correct binary value should be 0.0110... with the fractional part repeating.
Counters not working
By Kordus, with 5 replies.
Last reply by danpost, almost 8 years ago:
'Counter' is a class name -- it does not refer to a particular Counter object. You need a reference to the particular Counter object whose value needs adjusting there. Insufficient code given to help in this respect.
Bullet direction
By Azzzy24544, with 1 reply.
Replied to by danpost, almost 8 years ago:
I think the easiest way is to set it by the actor that creates it: <Code Omitted>
295
296
297
298
299
300
301
X