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

2013/4/20

Maze help

1
2
3
danpost danpost

2013/4/23

#
Yeah, I did not multiply the movement by 3. Change 'getX()+dx' to 'getX()+3*dx' and change 'getY()+dy' to 'getY()+3*dy'. Do the same with 'getX()-dx' and 'getY()-dy' to 'getX()-3*dx' and 'getY()-3*dy'. As far as hanging up on the walls, check to see where it is hanging up. It may be hanging up where two walls come together. If they are not aligned properly, there will be small ridges that prevent the ball from moving. It might be best to create a map of where the wall objects go and add them to the world via the map. Then adjust the world size to fit the maze created from that map.
Gingervitis Gingervitis

2013/4/23

#
I changed the code and it works perfectly. Thank you.
Gingervitis Gingervitis

2013/4/25

#
I added a new vertical wall to the game but when I used the same code for the other walls, I was still able to go through the wall. Is there a reason for this?
danpost danpost

2013/4/25

#
I am sure there is a reason, but there is no way for me to tell what it might be, at the moment.
JetLennit JetLennit

2013/4/25

#
Perhaps if you upload the game and the source?
You need to login to post a reply.
1
2
3