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

2012/7/11

AirForce

1
2
3
4
KommandoFaust KommandoFaust

2012/7/12

#
Wow, that's just amasing :) exactly what I have planed :D
KommandoFaust KommandoFaust

2012/7/12

#
How do you think about this kind of game? I started about 4 days ago with progamming and I'm amazed about it, everything you couldn't do with it.... :D
erdelf erdelf

2012/7/12

#
well, I like this kind of game, I made one myself, here
KommandoFaust KommandoFaust

2012/7/12

#
Im just amazed about your work... And now I can make further progress, added a new plane too... And I will add more elements tomorrow after work... But so far : http://www.youtube.com/watch?v=aXmOtlxirjE
KommandoFaust KommandoFaust

2012/7/13

#
http://www.youtube.com/watch?v=r6o5ht4E1m8
KommandoFaust KommandoFaust

2012/7/13

#
Does someone know If you can make the planes move just a little bit slower or faster : "setLocation(getX(),getY()+2) ;" "setLocation(getX(),getY()+1) ;" The difference between these is 1*2 = 2 and 1*1=1. Is there an option to make the movment speed 1.5 or 0.5, I know the system won't let it write as "setLocation(getX(),getY()+0.5) ;" or smth similar but if you have an idea let me know.
erdelf erdelf

2012/7/13

#
copy the following in Mover.class and you should be able to write someting like you mentioned:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public void setLocation(double x, double y)
{
    exactX = x;
    exactY = y;
    super.setLocation((int) (x + 0.5), (int) (y + 0.5));
}
 
/**
 * Set the location using integer coordinates.
 * (Overrides the method in Actor.)
 */
@Override
public void setLocation(int x, int y)
{
    exactX = x;
    exactY = y;
    super.setLocation(x, y);
}
KommandoFaust KommandoFaust

2012/7/13

#
It says cannot find symbol - variable exactX
erdelf erdelf

2012/7/13

#
sry forgot that;
1
2
private double exactX;
private double exactY;
KommandoFaust KommandoFaust

2012/7/13

#
Jeah, it worked now :) Thank you again!
KommandoFaust KommandoFaust

2012/7/13

#
Can this made with every value such as : "super.setLocation((int) (x + 0.2), (int) (y + 0.2)); " =?
erdelf erdelf

2012/7/13

#
usage is:
1
setLocation(getX(), getY() + 1.5);
KommandoFaust KommandoFaust

2012/7/13

#
now it's just fine :-)
KommandoFaust KommandoFaust

2012/7/14

#
I´m currently not at my own PC (@Work), but is there a simple task to let objects randomly appear, at the edge of the world ;-) ? I have an idea to do that, but I will try that later at home, haven't tried it jet.
trash1000 trash1000

2012/7/14

#
You could try something like this:
1
2
3
if(Greenfoot.getRandomNumber(4) == 0) {
    //call addObject method
}
There are more replies on the next page.
1
2
3
4