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
Variables between different worlds
By mattjames, with no replies.
Hi guys. I have been trying to get a menu to work that when you select an option it gives you a specific object on the game world. The button is in one world and the object that I want affecting is in another world. Having looking at and followed the tutorial on importing variables from classes, it tells me that the button cannot be cast to the other world. Has anybody got any code which will help me with this? Thanks
Using variables between classes
By GreenGoo, with 2 replies.
Last reply by GreenGoo, almost 11 years ago:
Thanks a lot, I just couldn't remember.
How Do I Animate An Actor?
By guttridgeb, with 4 replies.
Last reply by danpost, almost 11 years ago:
Gevater_Tod4711 wrote...
The second problem is that you try to compare the two images using == but this only works for int, double, char, ... not for objects.
That is not exactly true. It does work for objects also, but they have to be the exact same object (referencing the same instance of a class). Look at the code I provided above, at all times after the constructor is executed, the set image IS either 'image1' or 'image2' and the checks for them will work. The problem occurs when you try to compare something like 'getimage()' with 'new GreenfootImage("turtle1.png")'. Even if the
Side-Scrolling for Dummies
By LordNemocyr, with 6 replies.
Last reply by LordNemocyr, almost 11 years ago:
*Appreciate*
how to move ghosts randomly, where you're not allowed to control them?
By gquach, with no replies.
i was given commands, treeToRight(), treeToLeft(), treeBelow(), and treeAbove() i wanted the ghost to move separately later on, after hitting a tree above but can't, how can you do it? here's my code: <Code Omitted>
Can you access variable information between actors by defined actors?
By Entity1037, with 2 replies.
Last reply by Entity1037, almost 11 years ago:
I can work with that. Thanks!
Null Pointer Exception That Doesn't Make Sense
By Entity1037, with 8 replies.
Last reply by Entity1037, almost 11 years ago:
Nice. : )
Scenarios on OUYA?
By erdelf, with 4 replies.
Last reply by erdelf, almost 11 years ago:
I think that should work, but I am waiting for the arrival of the ouya since the end of the kickstarter session
Checking if there is an actor in the world
By GreenGoo, with 6 replies.
Last reply by FlyingRabidUnicornPig, almost 11 years ago:
Your welcome
Ziel
By Fordscorpio2, with 5 replies.
Last reply by Fordscorpio2, almost 11 years ago:
greengo : Yes your second idea is right:D
Piepton hört nicht auf
By Fordscorpio2, with 6 replies.
Last reply by Fordscorpio2, almost 11 years ago:
ausserdem geht es da nur um das bild, und nicht um den ton
Firing
By Hawx_, with 23 replies.
Last reply by JetLennit, almost 11 years ago:
Duh! I was thinking something else.... sorry about that!
HitCounter
By Hawx_, with 3 replies.
Last reply by danpost, almost 11 years ago:
You should make it like below if you want 5 hits before game over <Code Omitted>Also, you may want to remove any intersecting DarkPlasma or one may end up registered as multiple hits on your player.
I cant do a Menu to my game.
By Miikku, with 1 reply.
Replied to by danpost, almost 11 years ago:
Are you using a separate world class for your menu? If so, while the scenario is stopped, right-click on the icon of your menu world and select the 'new Menu()' option. Once done, the Menu world will be instantiated first.
Game for IT Class
By d4|\|i31, with 2 replies.
Last reply by Hawx_, almost 11 years ago:
repost this
836
837
838
839
840
841
842
X