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

2019/5/29

Zombie game

1
2
Anna_p Anna_p

2019/5/31

#
danpost wrote...
Anna_p wrote...
<< Code Omitted >>
You did not do as instructed.
danpost wrote...
Add the following line after lines 38, 46, 54 and 62 above:
setLocation(x, y);
Hello, I have continued my game but I came upon another problem that i don't quite know how to solve. I wanted the zombie to chase the character and it does, except that when the zombie turns around while it moves. I was wondering if you could help me make it walk in a normal way. I have uploaded the latest version of game so you can see what I am talking about.
danpost danpost

2019/5/31

#
Anna_p wrote...
I wanted the zombie to chase the character and it does, except that when the zombie turns around while it moves. I was wondering if you could help me make it walk in a normal way.
Maybe adding the following line at the end of the ZOMBIE1 class act method might help:
setRotation(0);
Anna_p Anna_p

2019/5/31

#
Thank you! that did it.
Anna_p Anna_p

2019/6/3

#
danpost wrote...
Anna_p wrote...
I wanted the zombie to chase the character and it does, except that when the zombie turns around while it moves. I was wondering if you could help me make it walk in a normal way.
Maybe adding the following line at the end of the ZOMBIE1 class act method might help:
setRotation(0);
I am now trying to make the zombies recognize the objects of the world. I thought about using isTouching like I did for the character except that I don't know what to put after the isTouching for the zombie for it to continue moving. I thought you might have an idea.
You need to login to post a reply.
1
2