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
Object moving towards another object
By xixEmilyxix, with 6 replies.
Last reply by xixEmilyxix, over 3 years ago:
thank you
World doesn't display text although code is correct - why?
By CodingCowgirl, with 8 replies.
Last reply by CodingCowgirl, over 3 years ago:
@danpost It's a simple button that redirects to the next question.
Displays greenfoot logo image
By AbdulrazaqAS, with 1 reply.
Replied to by danpost, over 3 years ago:
AbdulrazaqAS wrote...
I set different images to different characters but if I click run/reset, all of the characters display a foot(i.e. greenfoot logo).
How did you "set" the images? Explain or show code (which every way you did it).
Problems to launch greenfoot after installation
By Karlachan, with 3 replies.
Last reply by danpost, over 3 years ago:
Try an earlier version or the USB version.
how to make my actor move slower/faster after touching something
By spiu, with 7 replies.
Last reply by spiu, over 3 years ago:
Hi! Thank you both, the frog now moves at different speeds thank you so much. I didn't mention it before but the DoubleBug actually gives double points when its eaten lol. This is how the code looks like with the modifications you made
FROG JUMP
By ronald, with 15 replies.
Last reply by danpost, over 3 years ago:
ronald wrote...
I didn t do what I wanted, it will be another time. I have just published my scenario with the source code tell me why the screen is black, I think it is because of the images which are superimposed or something else, yet it works well thank you
javascript probably does not like the fact that you have to create an image to get its width for the class field
picWidth
.
Random spawn enemy
By Gengar360, with 1 reply.
Replied to by danpost, over 3 years ago:
Either (for left side): <Code Omitted>or (for right side): <Code Omitted>
Method depending on the world youre in
By HighIqE, with 3 replies.
Last reply by HighIqE, over 3 years ago:
ty very much man.
I need Help about GetRandomNumber();
By D_BUSTER9, with 2 replies.
Last reply by D_BUSTER9, over 3 years ago:
Ooooo, i see. Thank you very much bro :D
game won
By Tlax, with 3 replies.
Last reply by Spock47, over 3 years ago:
The hasWon method as given, will be returning true especially in the following cases: 1. If no balk exists at all. So, if there is no balk in the world, and the hasWon method is called, it will return true. So, depending on when you add the balks to the world, this can be your problem. You could either make sure that the method is only called after the balks has been added to the world (e.g. it should be ok, if the balks are added in the prepare method called from the constructor and the hasWon method is called from the act.) or add a check to the hasWon method that there have to exist balk
hey im trying to get this to do an animation but it just keeps bringing up an error
By whitecrow, with 5 replies.
Last reply by danpost, over 3 years ago:
The boolean
animateLeft
is not good enough for your needs. It only has two states, but you have 3 animation sets (left, right AND idle). An
int
value would be more appropriate to track which animation is being used. The best values for each set are '-1' for left, '0' for idle and '1' for right. By adding 1 to the animation set value, simple indices can be acquired (0, 1, and 2), which leads to the opportunity of placing the animation sets in an array. Sample code might look like this:
if loop not looping
By Aaron-aid, with 4 replies.
Last reply by Aaron-aid, over 3 years ago:
oooh, thanks man!
Change image of an actor from another class
By salim5112, with 5 replies.
Last reply by danpost, over 3 years ago:
salim5112 wrote...
thanks a lot
The last way is probably best as only one time is intersection checked, there.
Music doesn
By CodingCowgirl, with 2 replies.
Last reply by CodingCowgirl, over 3 years ago:
@danpost Thank you.
im having trouble creating a method that takes a class and sets its position
By Aaron-aid, with 2 replies.
Last reply by Aaron-aid, over 3 years ago:
holy crap ur a savior
51
52
53
54
55
56
57
X