This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

drhorriblejr
drhorriblejr presents ...

2012/4/11

DRH'sNewbiestartup

This package comes with some custom commands and a tutorial on them.

Please download :D

4462 views / 10 in the last 7 days

2 votes | 0 in the last 7 days

Tags: with-source custom package commands

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Wed Apr 11 19:59:58 UTC 2012
A new version of this scenario was uploaded on Thu Apr 12 02:01:03 UTC 2012 Added add-ons
SPowerSPower

2012/4/14

You could add the possibility to save the highscore of the user. If you don't know where to start, you can take a look at this course: http://www.2shared.com/document/fK0wPwlQ/Learning_Greenfoot_22.html If you're using it in your scenarios, I would appreciate it if you would add those scenarios to this collection: http://www.greenfoot.org/collections/314 I hope you like it!
drhorriblejrdrhorriblejr

2012/4/14

Maybe but i'm not that great at programming :(
-nic--nic-

2012/4/14

you dont need to be i managed:)
-nic--nic-

2012/4/14

you dont need to be i managed:)
SPowerSPower

2012/4/24

I tested it (I don't know why :) ), and if I said spin() and right(), the character will always be stuck at the right side of the world. I give you this tip: Instead of this code for right: [code]public void right() { setLocation(getX() + 5, getY()); }[/code] use this: [code]public void right() { move(5); }[/code] And do this for left(): [code] public void right() { move(-5); }[/code] I hope this helps. If you want, you can checkout my scenario Libary, which is basically a scenario with some great APIs. You can use that in this scenario if you want so.
drhorriblejrdrhorriblejr

2012/4/25

Thanks SPower And thanks for the votes guys :)
SPowerSPower

2012/5/4

In your readme 'file', you say things like "up(); moves the Class up.". That's not true. up() isn't a class/static method, so it can't do anything with the class. You need to say "up(); moves the object up.", because you call the methods you created to objects, not to classes. By the way, you do this in gotomouse(): if (Greenfoot.mouseMoved(null) ) { MouseInfo mouse = Greenfoot.getMouseInfo(); setLocation (mouse.getX(), mouse.getY()); } It's better to do this: if (Greenfoot.mouseMoved(null) ) { MouseInfo mouse = Greenfoot.getMouseInfo(); if (mouse == null) return; setLocation (mouse.getX(), mouse.getY()); } Now, you return if the mouse info isn't available. When you do this, you have less chrashes. (little tip: change gotomouse() to goToMouse(), more readable ;) ) I hope this helps!
drhorriblejrdrhorriblejr

2012/5/4

I don't quite understand all of that but thanks still :)

See all comments

Want to leave a comment? You must first log in.

Who likes this?

dlanni -nic-