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

Sirtuck's Comments

Back to Sirtuck's profile

Go for it. I haven't worked on this in a long time so I can try to help if you have any questions on it, no promises though.
Okay, so what it sounds like is that an object is being removed then something is trying to check that object which makes Greenfoot error, I will have a look around the code to see why this would be happening. If you can get it to happen again with any more details that would be appreciated. I also am uploading a new version so that mines now properly trigger on the square enemy.
Yeah. First off instead of using getX() and getY() I store the x and y values in doubles, this helps maintain accuracy. So once the user clicks I grab the mouseInfo. Using this I get an xDis and yDis. From these I find the angle from the player to the mouse position. Now with the angle I use basic trig to find the x portion of the angle and the y portion of the angle. Using these I multiply them times the speed of my object and add them to the x or y storage values I keep. Then set the location of the object to x, y. That is the basic setup, if you have any other questions or need clarification please let me know.
SirtuckSirtuck

2011/11/29

Haha ya I know. It is possible to get him though!