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
Make instructions like Ninja Survivor V2.0 (paging)
By Andriyanto, with no replies.
hi all.. can teach me make an instructions like Ninja Survivor V2.0 (http://www.greenfoot.org/scenarios/5541)????? or where i can get a source code for make instructions like that? i can't make a paging like that.. please all teach me..
Press object and prevent movement
By meir, with 1 reply.
Replied to by danpost, almost 13 years ago:
meir wrote...
Is there any way to prevent an object from being moved (dragged)?
While the simulation is running, an object cannot be dragged, unless you allowed it programatically using 'mousePressed', 'mouseDragged', and 'mouseDragEnded'.
meir wrote...
Is there a way to trigger a function when I drag an object in the world and then drop it (like a blur, and focus)?
'mousePressed' and 'mouseDragEnded' are perfect times to change the image how you please.
null pointed exception error
By wahaj, with 2 replies.
Last reply by wahaj, almost 13 years ago:
well thanks. but I kinda figured it out before you answered. and I'm pretty sure I wont be asking anymore questions because my game is almost finished. at this point its just a matter of how fast I can type. thanks for all your help. really appreciate it.
help with the mouse
By wahaj, with 10 replies.
Last reply by wahaj, almost 13 years ago:
oh man I'm so stupid. I kept putting all my code in the constructor of the world rather than putting in an act method. my code works fine now thanks for helping
help with shapes and mouse
By wahaj, with 9 replies.
Last reply by danpost, almost 13 years ago:
I do not believe that the background image of the world utilizes its transparency value to display the image. But, I do have a way to make it appear to. Create a new class, called 'Tint'. In this new class, create a GreenfootImage of size(1, 1), set the color to 'new Color(255, 255, 255, 100)', fill the image with its new drawing color using 'fill()', and set this image as the image for the 'Tint' actor. Add the following method to the new class:
Start command is weird. Help!
By Zamoht, with 6 replies.
Last reply by Zamoht, almost 13 years ago:
Thank you very much! I tried some different things, and I found out that the start() works fine with objects like the wombat from the tutorial scenario though it acts weird when I add "if" to the code like here. <Code Omitted>
i need help as soon as possible
By Benedict, with 14 replies.
Last reply by Benedict, almost 13 years ago:
it doesnt work and matter anymore, my teacher has the project already, but anyway, thank you all for your help :)
intersects help
By TimbooXD, with 5 replies.
Last reply by TimbooXD, almost 13 years ago:
it works thanks
Removing a object help
By DAustin15, with 1 reply.
Replied to by danpost, almost 13 years ago:
Add a TitleDeeds variable to your sub-class of World, call it unownedDeed and set it to 'null'. When one is spawned, instead of 'addObject(new TitleDeeds(...), x, y)', use 'unownedDeed = new TitleDeeds(...); addObject(unownedDeed, x, y);'. Then at the end of a player's turn 'if (unownedDeed != null) { removeObject(unownedDeed); unownedDeed = null; }'. Of course, if an unownedDeed is purchased, you must change the value of unownedDeed back to 'null'.
Making a the Bal move with a variable speed that changes when it hits something
By bakkie, with 1 reply.
Replied to by MatheMagician, almost 13 years ago:
Greenfoot gone weird
By gusbus123, with 10 replies.
Last reply by gusbus123, almost 13 years ago:
k ill take a look at that. I tried it once and i failed but ill try it again once im done with some other parts since i know a lot more than 15 days ago :P
is there any reason that the class name is to be shortened in the 2.2.1?
By won0c, with 8 replies.
Last reply by won0c, almost 13 years ago:
I have no problem on the 2.1.2 version !!
Saving and Loading
By GregC246, with 4 replies.
Last reply by GregC246, almost 13 years ago:
Found the answer
here
.
Problem with Counter and Text
By Prudene, with 2 replies.
Last reply by danpost, almost 13 years ago:
Create new sub-classes of Actor and name then 'GoodMessage' and 'EvilMessage'. In itheir constructors, create GreenfootImages, either with text or draw text on it. You could also use another program to create the images showing the text an import the images (pre-setting them to the actor classes). You can now create and add the message objects to the screen when a counter reaches 0.
Greenfoot Error
By Benedict, with 6 replies.
Last reply by tylers, almost 13 years ago:
use this in in one of the actors you want to use: <Code Omitted>
this is an example
this is an in a class called somthing.
<Code Omitted> hope you get it.
957
958
959
960
961
962
963
X