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
Calling an specific object from a class
By AlphaCookie, with 1 reply.
Replied to by danpost, almost 10 years ago:
AlphaCookie wrote...
I am trying to use a public String variable from an object in my world. There are other objects of the same class on the world, so i used Object obj=getOneObjectAtOffset to determine what actor i want to refer to. My problem is now, that obj.name can not be found, even though the object has a public string variable "name".
The variable reference 'obj' is declared to hold an Object type object. So, the compiler will look no further than the Object class for the 'name' field -- and will not find it. If you use:
Cannot be referenced from static
By SuperEgo, with 2 replies.
Last reply by SuperEgo, almost 10 years ago:
Thank you I had no idea, that tank was an object reference ^^;;
Need help inputting an integer into text
By had2ask, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
"Profit" is a String which doesn't have any relation to the 'Profit' int field. To display the 'Profit' int field, it could be done like this: <Code Omitted> Where does it give you the error?
Using Arrow Keys to Move Specific Amounts
By ftelliott, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
You could have a boolean field to save the state of the key and only if it is changing from not-pressed to pressed, you let it move.
Bullet/Fireball
By Nosson1459, with 7 replies.
Last reply by Nosson1459, almost 10 years ago:
Earthquakes
By Nosson1459, with 25 replies.
Last reply by Nosson1459, almost 10 years ago:
danpost wrote...
Even you have chimed in on a few.
so i shud answer my own questions??????????????????
Crab scenario switchImage (how?)
By Noob4928, with 3 replies.
Last reply by danpost, almost 10 years ago:
Nosson1459 wrote...
the above methods are methods that I don't know about.
Yes -- evidently. These methods are included in the Animal class which the classes given extend.
Detect wall before moving? Method returning true/false if actor can move?
By ParticleCollision, with 4 replies.
Last reply by ParticleCollision, almost 10 years ago:
Oh god. Setting those values to 0 really worked, I couldnt understood, what the parameters are meaning. I put the noWallInFront() method into the move() method, so the line looks like this:
Remove Objects add Objects
By smcgee, with 4 replies.
Last reply by smcgee, almost 10 years ago:
dan - excellent - this worked for everyone! smcgee
Pause a game.
By LimeLava, with 8 replies.
Last reply by LimeLava, almost 10 years ago:
So i have some text in the corner of the screen that shows the level and I want it to pause everything for a few seconds when it reaches a different level.
problems with getObjectsAt
By daw_germany, with 2 replies.
Last reply by danpost, almost 10 years ago:
See
getObjectsAt
.
cannot find symbol, help
By divinity, with 18 replies.
Last reply by divinity, almost 10 years ago:
hi danpost and super_hippo I got it fixed. thanks you a lots danpost and super_hippo. much appreciate all the help. System.out.println(" BIG HUGS TO YOU BOTH");
Referencing a non active world.
By MJBelmer, with 5 replies.
Last reply by Nosson1459, almost 10 years ago:
The world which is initialized first, is the one that you right-click on, then in that right-click drop menu press "new Intro()", which is the first thing on that list, also the only thing written in black. That could be the menu world and when you click on the menu button in that world you do <Code Omitted> and it will switch to game world.
Need help implementing wall collision on automated Hostile actor
By miahg17, with 3 replies.
Last reply by miahg17, almost 10 years ago:
I'm currently using a method that turns 120 and moves 3 if an obstacles is intersected but that results in inconsistent behavior, sometimes jumping the Hostile through the obstacle.
Need help with stopping an actor from still trying to execute methods after removal from game
By miahg17, with 5 replies.
Last reply by miahg17, almost 10 years ago:
Thanks for the help danpost.
421
422
423
424
425
426
427
X