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

2015/3/5

What am i doing wrong?

1
2
RICHJAMA RICHJAMA

2015/3/5

#
oky.. so what do i do?
RICHJAMA RICHJAMA

2015/3/5

#
i Got it!!!!!!!!!
RICHJAMA RICHJAMA

2015/3/5

#
I'm sorry I'm so Greenfoot dumb it took me a minute to get what you where saying smh lol
danpost danpost

2015/3/5

#
Use the name of the fields instead of the incorrect ones. Also, you keep calling non-existent methods. There is no 'atWorldEdge' method in the Actor class nor in the Hunter class as well. And calling 'isAtEdge' does nothing in itself (see your act method of the Hunter class). The statement is like saying 'true;' or 'false;'; by themselves, they are meaningless.
RICHJAMA RICHJAMA

2015/3/5

#
got it!! but then can't i inherit it from? Methods inherited from class greenfoot.Actor addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, turn, turnTowards
danpost danpost

2015/3/5

#
I do not understand what you mean. I do not see 'setDirection' nor 'atWorldEdge' in that list. Also, the 'move' method inherited has one int parameter and you are trying to call one without any parameters; so, the one you are calling is non-existent.
You need to login to post a reply.
1
2