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
How can I spawn actors for a 5 second and then removed them and replace with others
By BestMannCZ, with 2 replies.
Last reply by BestMannCZ, over 6 years ago:
Thank you very much
How can I move an Actor to another Actor?
By Starlord_20, with 2 replies.
Last reply by Starlord_20, over 6 years ago:
Works, thank you very much! :)
Variable containing classes
By JamesR, with 3 replies.
Last reply by danpost, over 6 years ago:
JamesR wrote...
<< Code Omitted >> I want it so I can have 2 or more classes there if that helps explain it.
So, you want: <Code Omitted>Btw, it is not "2 or more classes" -- it is "2 or more actors (or instances of a class)" .
Maze - detect black color from picture and make it solid
By Aelin, with 2 replies.
Last reply by Aelin, over 6 years ago:
Ah.. thanks. It works now.
How can I spawn actors for a 5 second and then removed them and replace with others
By BestMannCZ, with 4 replies.
Last reply by danpost, over 6 years ago:
Now move the
for
loop into its own method so you call it later from
act
method. Remove your new discussion thread. Deal with issues here.
please help me
By mysrilal, with 4 replies.
Last reply by danpost, over 6 years ago:
Hundmat wrote...
mb
Not really. You could not know without downloading and taking a look at the code of the scenario. No need to apologize or imply self-blame..
Incompatible types: possible lossy conversion from float to int
By Alexkr, with 7 replies.
Last reply by danpost, over 6 years ago:
Alexkr wrote...
This is my actual code: << Code Omitted >>
If that is all you changed, then no wonder you still have issues. You are now (trying to) passing a
float
value to a method that has an
int
parameter (to set speed of enemies). Use
e#.setSpeed((int)enemy#Speed);
in act method.
Problem: Trying to set class as a parameter in a method to spawn actors
By comfortablyNumb, with 8 replies.
Last reply by comfortablyNumb, over 6 years ago:
thanks for the help thats a really cool solution. still new to java programming and using the whole object orientated thing.
isKeyDown only detect once
By WackBoi, with 2 replies.
Last reply by WackBoi, over 6 years ago:
That was exactly what I was looking for. Thanks for your efforts. Appreciate it a lot.
HELP ME X2
By goku888, with 1 reply.
Replied to by danpost, over 6 years ago:
goku888 wrote...
as I do to put as walls that can not be transferred
At what point are you having difficulty: (1) building wall class; (2) adding wall(s) into world; (3) having actor(s) not pass through wall.
AYUDENME X2
By goku888, with 1 reply.
Replied to by ndembayle79, over 6 years ago:
need help guys
How could I set my ship to stop shooting for a few seconds after being hit by an object?
By Someguyoutside, with 1 reply.
Replied to by danpost, over 6 years ago:
Someguyoutside wrote...
if processShot() is my method for shooting, how would I be able to delay that or pause it for a few seconds?
Add shot delay field: <Code Omitted>Then: <Code Omitted>Set value of field to something like 180 when hit by object.
Making objects fall in a certain area
By vysh, with 4 replies.
Last reply by vysh, over 6 years ago:
Thank you lord danpost :D ! I'll try this out!
Ayuda para que el objeto coma
By Jesus1357, with 1 reply.
Replied to by danpost, over 6 years ago:
Usa: <Code Omitted>
Bringing functions from another class
By anonymous_panda, with 1 reply.
Replied to by danpost, over 6 years ago:
Using just: <Code Omitted>in your
Fish
class indicates that the method is either (1) in the
Fish
class; (2) in any one of its super classes (as a non-private method); or (3) in an interface that one of the aforementioned classes implements. Since it (the method) is located in your
Level2
class, you need to indicate that that is where to find the method. Actually, it is the
Level2
object (your current world object) that "has" the method. It is the
score
in that world that you want to increment. The
getWorld()
method will return a r
165
166
167
168
169
170
171
X