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
Help With game
By DoctorrBoss, with 2 replies.
Last reply by DoctorrBoss, almost 13 years ago:
Thanks, it is working now. I'm a bit of a novice so I don't notice small things :/ Thanks again mjrb4 ;)
New Racing Game
By MoizRashid, with no replies.
I have 4 cars in my game. One is controlled by the player. I want to make the others move around the track without going off of it. I want some to be faster/trickier than others, please help!
problem to compile
By calvo, with 1 reply.
Replied to by JL235, almost 13 years ago:
I presume this is one of the gamepad scenarios that this is failing with? From your stack trace it looks like the file is incorrectly named. So try going into the scenario's project folder and rename the file 'jinput-dx8_64.dll' to 'jinput-dx8-64.dll'.
Printing out a variable
By Oneshot, with 12 replies.
Last reply by danpost, almost 13 years ago:
You need the number (2) in the getRandomNumber calls for this to work properly. Also the spawnX and spawnY variables do not need to be object instance variable -- just local to the method. With your timer increment inside the if where you have it, it will only get incremented when a zombie is spawned, so I moved it outside (where it should be). This is how it should look:
How To Make Timer and Level in greenfoot
By Rhoelly, with 15 replies.
Last reply by SPower, almost 13 years ago:
You better do that using these '-->' or something, like: greenfoot-->Greenfoot-->setWorld(World)
how to show a tekst message in the world when hovering over an actor with your mouse?
By 0868626, with no replies.
dear Greenfooters i am trying to show a tekst message( to describe the actor) when hovering over an actor with your mouse,, i have tried a lot mayby you guys can help me. sorry for my bad english my code: public class Kraan extends Actor { GreenfootImage KraanMove1 = new GreenfootImage("crane1.png"); GreenfootImage KraanMove2 = new GreenfootImage("crane2.png"); GreenfootImage KraanMove3 = new GreenfootImage("crane3.png"); GreenfootImage KraanMove4 = new GreenfootImage("crane4.png"); public int animationCount = 1; public int frame = 1; boolean mouseOver = false; public void act() { // Add your action code here. animation(); if (!mouseOver && Greenfoot.mouseMoved(this)) { // i want to show a tekst message in my world } } public void animation() { if (frame == 1) { setImage(KraanMove1); frame = 2; } else if (frame == 2) { setImage(KraanMove2); frame = 3; } else if (frame == 3) { setImage(KraanMove3); frame = 4; } else if (frame == 4) { setImage(KraanMove4); frame = 1; } } } you
Gifs don't work in my program??
By NumberTroll, with 4 replies.
Last reply by NumberTroll, almost 13 years ago:
danpost wrote...
You can still 'setImage'. You just need a delay timer (an int field that goes to a specified value; when that value is reached, change to the next image and reset the field to zero).
But I have 20+ images and I don't want to write them out one by one, so a gif would be a lot more easier. Is it possible to solve the gif problem?
How to make a basic in-game store?
By chrl98, with 1 reply.
Replied to by davmac, almost 13 years ago:
I recommend you start to try and write the code for one of these "upgrade buttons" and see if you come across any problems. If you do, you can ask here. (The question as you've written it is a bit too broad).
How to stop an object from moving?
By y0us, with 1 reply.
Replied to by y0us, almost 13 years ago:
Nvm I already figured it out :) This one worked: setLocation(getX(), getY() + 1); if(getY() == 309) { setLocation(getX(), getY() - 1); }
Greenfoot stop
By Aaron91, with 16 replies.
Last reply by Aaron91, almost 13 years ago:
Now that you say that.. i noticed i made my 'hit' methode somewhere else. I can remove that 1 actually. I placed my 'hit' ('isGeraakt') in my barrel actor. i think this is about right? or do you see something that is wrong or could be simplified?
Help with bug. (urgent)
By chrl98, with 5 replies.
Last reply by chrl98, almost 13 years ago:
Thanks danpost :). Guess I accidentally added it. Scenario will be removed now.
Clock
By quakster1, with 5 replies.
Last reply by danpost, almost 13 years ago:
quakster1 wrote...
I just managed to try this now and when I tried the code, the greenfoot picture was there for a couple seconds there is like a delay. How do I remove it
Who are you writing to and what is your current code (use the 'code' tag under the input box and show the entire class).
how to end game
By hskaratekid, with 10 replies.
Last reply by danpost, almost 13 years ago:
hskaratekid wrote...
i already have the if statement but do you know what statement to use to change to a different world
Use the Greenfoot class 'setWorld' method -- refer to documentation.
I need Help - NullPointerException
By DoctorrBoss, with 10 replies.
Last reply by DoctorrBoss, almost 13 years ago:
kk thanks!!
Need help !! :(
By TwoiBratan, with 10 replies.
Last reply by danpost, almost 13 years ago:
(1) 'getObjectsInRange' returns a list of all Rocket object within 100 pixels of the center of the actor (the moon, in this case); see
here
; please note it returns a 'java.util.List' object. (2) 'isEmpty' returns a boolean value indicating whether the list object from (1) is empty or not; see
here
; (3) the condition in (2) determines whether the scenario should stop or not, using the 'stop' method of t
745
746
747
748
749
750
751
X