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 to add sound on start menu and stop it when the button clicked
By vessaliuzz, with 7 replies.
Last reply by miningmanna, over 11 years ago:
no problem :)
Help with optimizing my EnemySpawner and Animation Class
By miningmanna, with 5 replies.
Last reply by danpost, over 11 years ago:
You should be able to see immediately from the use of your 'for' loops that your way would be more cpu intensive. These method calls, on the other hand, are quick and simple (just returning values that are already saved in fields -- no counting required).
should I use if or while
By whitestag, with 3 replies.
Last reply by danpost, over 11 years ago:
If you have more than one 'for' loop in the program, you should be able to convert one of them to a 'while' loop easily enough. For example: <Code Omitted>can be converted to this <Code Omitted>The 'do-while' loop is a bit different than the 'while' and 'for' loops in that the condition to continue the loop is checked at the end of the block instead of at the beginning. So one iteration of the block must be allowed to execute. It would be alright to convert the above into a 'do-whil
2D raycasting
By wabuilderman, with 12 replies.
Last reply by wabuilderman, over 11 years ago:
Ok. Thanks. :)
Unable to Install Kinect OpenNI driver for Windows
By Champ, with no replies.
I'm trying to connect Kinect with Greenfoot. I'm following the instrcution as mentioned on below URL: http://www.greenfoot.org/doc/kinect/windows.html Here it is mentioned that to install driver I need to run this command: bcdedit /set testsigning on However when I ran this command by following the instruction then it I'm getting an error as mentioned below: C:\WINDOWS\system32>bcdedit /set testsigning on An error has occurred setting the element data. The value is protected by Secure Boot policy and cannot be modified or deleted. I stopped here as I believe it is must to run the above command successfully then only I should install the driver. Can someone guide on how to fix this issue so that I can install the driver and connect Kinect with Greenfoot. Thanks!
I keep getting an error when trying to remove an enemy
By nosmic, with 1 reply.
Replied to by danpost, over 11 years ago:
You now have in the Zombie class the same issue you had in the Bullet class. One method removes the actor and the following code is executed without regard to whether the actor is still in the world or not.
Help with my Animation Class
By miningmanna, with 7 replies.
Last reply by miningmanna, over 11 years ago:
nevermind made a cloneAnimation method :) Still thanks for your support: - danpost - wabuilderman - JetLennit :)
What is with all the 8unch0fR4nd0mNum8ers_Project_AS stuff?
By wabuilderman, with 1 reply.
Replied to by danpost, over 11 years ago:
I think they are student numbers followed by a project identification and/or assignment number.
Why cant I get world information inside an Actor constructor?
By jguevar3, with 4 replies.
Last reply by jguevar3, over 11 years ago:
Thank you guys! I ended up using the addedToWorld() method like this: <Code Omitted> I
Increasing speed per click?
By lamboa, with 3 replies.
Last reply by wabuilderman, over 11 years ago:
you would have a variable, "speed", and you would increase it by a certain amount whenever the mouse is clicked. If you don't know how to code that, try looking at the API.
Here.
It would look something like this: <Code Omitted>
Continuously moving object?
By miegoer, with 1 reply.
Replied to by wabuilderman, over 11 years ago:
What you need to do is have a "speed" variable. increase the variable when you want it to move. In the act statement, simply call a move(speed) function. This way, if speed = 0, you don't move, if it is greater than 0, it will move forward.
Score doesn't work it counts all the time
By whitestag, with 8 replies.
Last reply by whitestag, over 11 years ago:
it worked now thank you so much :)
Get more than ONE object at OFFSET?? (:
By JohnVarick, with 1 reply.
Replied to by danpost, over 11 years ago:
Vague. Is the "another object" also a Star object or of a different type? (from the title, I would presume the "another object" be of the same type). If the same type, then use 'getObjectsAtOffset'. If not, use something similar to how the Border was removed when the Heart2 was eaten (from your previous discussion thread).
Intersection help! :)
By JohnVarick, with 3 replies.
Last reply by danpost, over 11 years ago:
You could make use of the 'getObjects' method of the world class: getObjects(Border.class) or from the Actor class: getWorld().getObjects(Border.class) which creates a list of all Border objects in your world. The list will contain either one element (the one Border object in your world) or it will be empty (after the one Border object has been removed). The 'removeObjects' method of the world class can then be used, instead of the 'removeObject' method, to have any objects listed removed from the world:
Adding GreenfootImages to a List
By miningmanna, with 2 replies.
Last reply by miningmanna, over 11 years ago:
thanks danpost :)
554
555
556
557
558
559
560
X