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

2013/1/1

Respawn Question

comandodude101 comandodude101

2013/1/1

#
If I want something to respawn after being eaten, how would I get it to respawn without resetting the world?
Oxy Oxy

2013/1/1

#
Try this: ( lets pretend your trying to spawn a fish with class named Fish) make a timer. and decide how long you want to wait before each spawns when the timer reaches a certain point in time that you decide Actor fish; Fish fish = new Fish(); addObject(fish, X you want, Y you want); I dont know how to make a timer but there are programs you can look at on this site to find out how im sure.
comandodude101 comandodude101

2013/1/1

#
Thanks but what I want is like instead of a timer I need like a REspawn not just another spawn. Ex: If crab gets eaten by lobster, then crab respawns automatically without need of resetting world.
comandodude101 comandodude101

2013/1/1

#
What would be a code for that?
You need to login to post a reply.