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
I mant to animate a frog jumping
By richyd012, with no replies.
so ive already got the animation of the frog moving perfectly just how i want it but i cant seem to stop the whole world from moving when it animates. when i use timers or counters the animations just don't works as well, like the frog does come bak to its original position when the key is released <Code Omitted>
windows 8.1 java 8 +
By actinium, with 5 replies.
Last reply by danpost, over 11 years ago:
I do not know if it will make any difference or if yours is set or not; but, if the checkbox at the top of your Java security settings tab that allows java content in your browser is not checked, try checking it.
How to spawn an object at xy location on mousehover?
By YosuaZakaria, with 3 replies.
Last reply by YosuaZakaria, over 11 years ago:
It works, thanks a lot danpost :) o7
is there anny easy way to find the sorce file of a greenfootImage?
By fejfo, with 7 replies.
Last reply by danpost, over 11 years ago:
Was this just a curiosity question, or was there a specific reason for asking it? and if there was, why? that is, what is it you were hoping to accomplish once the acquired filepath/name was acquired?
How can I detect the upcoming object infront of my actor ?
By VivekRajagopal, with 1 reply.
Replied to by Super_Hippo, over 11 years ago:
Since your issues are connected to each other, you don't have to open two discussion threads for that. If your crossroad has exactly horizontal and vertical streets, you can check for the lines without having the lines as an object. If you want to do it as an object, you can check for collision with the line like you do with other cars (check the other discussion thread). If not, it will be something like this: if, after moving the additional dx, the x-position of the car which comes from the left side is greater than the x-position of the left line, or the x-position of the car which comes
Cars as object and they should stop from collision and stop in the traffic light also.
By VivekRajagopal, with 1 reply.
Replied to by Super_Hippo, over 11 years ago:
How I do it in my
Traffic Simulation 2
simulation, is that I simply move the car more than it actually drives (+dx) and check for collision. So I can see if there is another car in front of it and if yes, it should brake. Then move back the distance that it moved "too much" (-dx).
get X/Y of another class?
By h123n, with 1 reply.
Replied to by danpost, over 11 years ago:
This
shows what you can do.
Can anyone tell me how to maek my enemy shoot?
By jocallaghan97, with 3 replies.
Last reply by danpost, over 11 years ago:
You will need three values -- one for the minimum delay (measured in act cycles) between shots and another for the maximum delay. The third value will be for the timer itself and will be an instance field in the class (the other two values can also be made fields if desired as follows:
Help-barriers
By Leenza, with 8 replies.
Last reply by danpost, over 11 years ago:
You cannot compare literal strings with field values like as in lines 5 and 9. You will always get a false result in the comparison as the literal String object is not the same object as the one referenced by the field. You need to compare the contents of the String objects, not the objects themselves. This is done by use of the 'equals' method. For example, line 5 should be: <Code Omitted>
How can I dynamically change the size of the world? (Only once, however)
By decadence18, with 7 replies.
Last reply by decadence18, over 11 years ago:
@Danpost, I managed to do it using a globally-defined variable in a world previous to the one in which I needed the variable.
How can I dynamically add a certain number of "variables"?
By decadence18, with 10 replies.
Last reply by decadence18, over 11 years ago:
That might work too. I have two classes that need to use this painting technique; I may try both to see which one would work better for this purpose.
I'm looking to learn Java. Which way, in your opinion, is the best?
By decadence18, with 2 replies.
Last reply by decadence18, over 11 years ago:
Alright, thanks @danpost. I'll try it.
Need help with this shoot code!
By jocallaghan97, with 4 replies.
Last reply by jocallaghan97, over 11 years ago:
all working now, thanks
spawning an car actor from two locations
By Rayray, with no replies.
the car actor is set to face right, what i want is it to continuously spawn from a x=1,y=100 location for example and also x=100,y=1 location by rotating 90 degrees so the car travels down
can i use getOneIntersectingObject for a object of a class in world instead of the class itself?
By Rayray, with 5 replies.
Last reply by Rayray, over 11 years ago:
thanks for helping out
582
583
584
585
586
587
588
X