Sign Up, Lost Password
You need to login to take part
How to generate the entire timing of the simulation
By Jemy, with 4 replies.
Last reply by danpost, 34 minutes ago:
I initialized a timer variable in my world fields and increment it in worlds act method. my challenge is how to tell the time to stop after the whole simulation run completes.
If you want to put a condition on when the timer runs, then do it.
By ronald, with 25 replies.
Last reply by danpost, about 9 hours ago:
Set rotation of circular bar actor at 180 and set its range from 0 to 60. Then adjust its value with the seconds.
How to attach an actor to another actor?
By ambrokato, with 15 replies.
Last reply by danpost, about 11 hours ago:
You should not need an array in the
class -- just the
Is it possible to make the mouse cursor hidden or change the image of the mouse cursor?
By Jayyhk, with 6 replies.
Last reply by RcCookie, 1 day ago:
You may still be able to access these information, using reflection (accessing any field by name, also private ones). I’ll take a look at that soon
Scenario gives error in website but not in app
By Roshan123, with 31 replies.
Last reply by Roshan123, 2 days ago:
I checked one by one and the moment i removed line 267 (in MyWorld) i.e. //addObject(rtext, 0, 0); .....it stopped acting weird in website rtext is the problem in website
how to reset my timer
By Jemy2, with 16 replies.
Last reply by Jemy, 3 days ago:
it is giving me: follower leader on the second run
I am not yet able to figure out why.
I was able to resolve it. I had to set the static variables to zero in the Server constructor and it is working now. Thank you for your assistance
Im trying to spawn a different monster in myWorld but i cant figure it out.
By ambrokato, with 17 replies.
Last reply by ambrokato, 3 days ago:
if statements, add condition of what current level should be.
Came back to say Thanks Dan! appreciate your help!
Nevermind, I figured it out. I feel really silly.
By DrJ, with no replies.
He forgot to set an image with the subclass.
a little green foot image is where a red circle should be
By DrJ, with 1 reply.
Replied to by Super_Hippo, 3 days ago:
The green foot appears if there isn’t a default image assigned to the class and the actor didn’t call the “setImage” method.
By gnayron007, with 1 reply.
Replied to by Super_Hippo, 3 days ago:
What did you try?
How to create a scrolling world
By HarrisonCate, with 1 reply.
Replied to by Game/maniac, 3 days ago:
Danpost has made a really good tutorial for scrolling worlds here: https://www.greenfoot.org/scenarios/18226
By ShadowJL, with 5 replies.
Last reply by ShadowJL, 4 days ago:
Thanks, jumping works fine now.
Not landing correctly (platformer)
By CreatorMoon, with 14 replies.
Last reply by CreatorMoon, 4 days ago:
After adjusting a few things (and removing the "+2" after myHeight in line 11) your method worked perfectly! Thanks danpost and RcCookie :D I'm having an issue with another part of the game, but I'll make a separate discussion for it.
How to reference a variable define in world to other class
By Jemy2, with 2 replies.
Last reply by Jemy2, 5 days ago:
It is private and static. Private means that you can’t directly access if from outside the class. Static means that it is a variable for the class and there is not an individual variable for each object of the class. The name of the variable suggests that it would be a final variable which is only defined once and never changed, but it doesn’t have the keyword. To access the variable from somewhere else in its current form, you need a public method in the same class – often called a “getter”-method. <Code Omitted>
How to Make Object Blink When It Collides With Another Object?
By 27WhiteLighters, with 4 replies.
Last reply by 27WhiteLighters, 5 days ago:
@Risen The code you posted does not work, because under line 27, Greenfoot gets an error saying "cannot have 'else' without 'if' or something like that. Sorry I could not reply, my power went out, but thanks for trying! You actually gave me a few ideas, but I'm still open to suggestions.
Sorry, my fault. Swap lines 25 and 26
Yes, It works now! Thanks! Again, my power turned off again hence the late response..