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

2013/8/24

HELP!

spower21 spower21

2013/8/24

#
i am currently working on a zombie game. I have it working so that the zombie , that is saved in the world, attacks you when the game starts but how do i get it to spawn more zombies as the game goes on and to make it side scroll when the character gets to the edge of the world?
Gevater_Tod4711 Gevater_Tod4711

2013/8/24

#
To make zombies appear you just have to add some zombies randomly to the world. Using Greenfoot.getRandomNumber(int) you get a random integer which you can use for random spawning. To add the zombies to the world you use addObject(new Zombie(), x, y); To make the world a scrolling world you should use a support class like my Infinite Scrolling World. In this world you actor can move on and on and on ...
spower21 spower21

2013/8/24

#
@Gevater_Tod4711 if I do that it says ".class expected"
Gevater_Tod4711 Gevater_Tod4711

2013/8/25

#
Where exactly do you get this error message?
You need to login to post a reply.