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
About this answers
By Sauravbasyalking12, with 1 reply.
Replied to by danpost, over 5 years ago:
It would not be right to just give answers to assignments or homework questions here.
Coloring showText()
By franno, with 2 replies.
Last reply by franno, over 5 years ago:
danpost wrote...
franno wrote...
how do I color the text shown with showText() ?
You cannot change how showText displays text at all.
Also, the stroke is quite heavy, and I don't know how to fix that either
Please refer to my
Value Display Tutorial
scenario.
Fair enough, Thanks! I'll look into it :D
my string name isn't working
By ninjapuffin, with 4 replies.
Last reply by ninjapuffin, over 5 years ago:
thanks it worked
I Require Assitance
By FrostyBoi, with 1 reply.
Replied to by danpost, over 5 years ago:
FrostyBoi wrote...
Hello I am new to Greenfoot and am currently working on a TD project the problem is that i want a tower to shoot for a certain amount of time then pause then start again Plz Anyone
Add an int field as a timer. Increment to a number equal to acts required for one cycle of shooting and not shooting, then reset to zero. With lower values for shooting, if in that range and divisible by some number, say 60 for shooting each second, fire. So, let us say you want to shoot 4 shots in 4 seconds (one per second), then not shot for 6 seconds, repeating. Assuming normal run
A method that is called whenever an actor get's removed
By RcCookie, with 6 replies.
Last reply by danpost, over 5 years ago:
RcCookie wrote...
Yeah, but I'd like to have the AdvancedActor and the collider be like a standalone, without having to edit the world
Okay. How about putting the following in the
Collider
class: <Code Omitted>
Executing a static method every frame
By RcCookie, with 7 replies.
Last reply by danpost, over 5 years ago:
RcCookie wrote...
I know, but how do I know that it's not been executed this frame already? If I will at some point create a more complex world basis, I might let it do that stuff because I know every of my words extends from it and will in fact run that code, but then I might as well create an instace of time.
If you only call it once from your
World
subclass'
act
method, it will only execute once per frame.
How to get the currently running world
By RcCookie, with 8 replies.
Last reply by Kostya20052011, over 5 years ago:
Again, I don't quite understand, but I think you've already found the answer ;)
Greenfoot random number with it duplicating
By Kaggs, with 8 replies.
Last reply by Kaggs, over 5 years ago:
i have hard coded it so that there are no duplicate
What Age is "old enough" for Greenfoot?
By gedoente, with no replies.
Hi, just a quick question, what age will be a good age for my kid to start with Greenfoot?
Hello help karlo
By Roshan123, with 7 replies.
Last reply by Kostya20052011, over 5 years ago:
Yes, that's what I wanted to say)
Stopping Objects
By Vernz, with 3 replies.
Last reply by RcCookie, over 5 years ago:
I was assuming that you wall class is called „Wall“. Otherwise you have to change line 6.
How to display an int on the screen?
By ANIMALLOVER09824, with 17 replies.
Last reply by RcCookie, over 5 years ago:
ANIMALLOVER09824 wrote...
Should this work? <Code Omitted> Because it doesn't this is all it shows, <Image Omitted> and i have score set as 3
Yes, if the method is called
Timestep between two frames
By RcCookie, with 5 replies.
Last reply by danpost, over 5 years ago:
RcCookie wrote...
No the idea is to get the fraction of a second that the last frame took. That means that if you count up every frame by deltaTime the value should increase by one each second
If I understand correctly, this should do: <Code Omitted>
Increment
By Roshan123, with 5 replies.
Last reply by danpost, over 5 years ago:
RcCookie wrote...
You're right, it has to be like this: << Code Omitted >>
That is better.
Random
By Roshan123, with 5 replies.
Last reply by danpost, over 5 years ago:
Roshan123 wrote...
Its not working I used showText It shows that the qTimer is not increasing
Show codes. Also, it would never increase, anyway. It would be set (from zero) to 180 and decrease from there.
113
114
115
116
117
118
119
X