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
Basic AI Difficulties
By KingCowWill, with 3 replies.
Last reply by danpost, almost 11 years ago:
KingCowWill wrote...
enemyRot is just getting the rotation for the bullet that comes out of the TIE fighter.
Although that method of getting the rotation to the bullet may work, it is not good programming -- to use a class field for something that should belong to an object of the class. There are other ways to get the bullet to rotate the proper way. You can break line 55 above into its components, like this: <Code Omitted>The first line gets a local reference to the bullet created. T
Need Help with adding a 'health pack' to my game!
By JLItachi, with 17 replies.
Last reply by JLItachi, almost 11 years ago:
Never mind, I figured out what I did wrong, it works all perfectly now. Thanks for everything Dan!
Error with 2d array
By Raideron, with 6 replies.
Last reply by Raideron, almost 11 years ago:
It was indeed not in a method, this fixed it, thank you!
how to change the font
By Steven.Z., with 2 replies.
Last reply by Steven.Z., almost 11 years ago:
thanks
mirrorHorizontally() changes Image color. How to fix?
By EnderPicture, with 3 replies.
Last reply by EnderPicture, almost 11 years ago:
Running on Windows 8.1 With GreenFoot 2.4.0. http://gyazo.com/4cf93f7ab1d255929faeedb84123a248 http://gyazo.com/3ef0c9630b111660ee12440e31776cd1 I think it is the problem. How to fix it?
Relative movement issue with scrolling world
By Dillybar, with 16 replies.
Last reply by danpost, almost 11 years ago:
One discussion on the 'getUnivX' and 'getUnivY' methods is
here
. It appears that is when I added the 'getScrollingWidth' and 'getScrollingHeight' methods. Anyways it does provide a use for the methods (as they were written at the beginning before this post; or, as in
this
discussion) and shows how they can be used.
Remove score once.
By Gzilia, with 4 replies.
Last reply by danpost, almost 11 years ago:
The initial line I gave would be the least you would need; however, this would require the counter to update its image every act cycle. The second way, lines 3 and 4, is better only in that the counter only updates when needed -- that is, when the score actually changes. This reduces the workload on the system as working with multiple or large images is one of the major causes in producing lag.
Take Score to the next Level - How to do it?
By Riegsche, with 1 reply.
Replied to by danpost, almost 11 years ago:
You probably have a line like the following to go to the Level 2 world: <Code Omitted>That line is short for this: <Code Omitted>The expanded code gives you a reference to the new Level 2 world created. You can access any public field and execute any public method in that Level2 world right between those lines. For example: <Code Omitted>
How do I access a score from another world?
By Ruvero, with 2 replies.
Last reply by Ruvero, almost 11 years ago:
The first solution did the trick, thank you!
Can you move Objects off screen?
By EnderPicture, with 2 replies.
Last reply by davmac, almost 11 years ago:
Use the 'bounded' parameter to the World class constructor to specify whether you want a world to be bounded (actors contained within world bounds) or unbounded (unconstrained actors). Normally your world constructor has a line like: <Code Omitted> You need to add the 'bounded' parameter. For an unbounded world, that should be false: <Code Omitted>
Can you put images in folders in the images folder?
By EnderPicture, with 3 replies.
Last reply by davmac, almost 11 years ago:
Then it should work fine. You need to put the relative path to the image. If the image is called 'a.jpg' and is in folder 'abc' inside the images folder, then you name it as 'abc/a.jpg', eg: <Code Omitted>
How to make an actor move only when an other actor intersects
By sjoerdieman, with 2 replies.
Last reply by danpost, almost 11 years ago:
Also 'Counter' for a field name has multiple downsides. First one thing, by convention, field names should begin with a lowercase letter. For another, the name does not remotely describe what the field is for -- you are not using it as a counter, but more as a direction indicator. Better would be to use it for the direction itself, which can be found at the end of lines 11 and 14 -- '-1' and '1': <Code Omitted>You will n
turnTowards oddity
By DoWhileNot, with 3 replies.
Last reply by danpost, almost 11 years ago:
DoWhileNot wrote...
I see what you mean. The solution for the hardware limitation looks like it's already been worked out though, using Vector and the SmoothMover subclass of actor.
That is what those classes were designed to do (particularly the SmoothMover class).
PLEASE HELP!!! Shooting an opponent is failing!
By jamesyu415, with 7 replies.
Last reply by danpost, almost 11 years ago:
Please show your revised bullet code.
How to let an object 'slide' after a movement?
By AnthonioBanderas, with 6 replies.
Last reply by Super_Hippo, almost 11 years ago:
Did you import the Smooth Mover class and have the SpeedBoat extend it?
614
615
616
617
618
619
620
X