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

2018/8/23

Shooting Help

1
2
Super_Hippo Super_Hippo

2018/9/11

#
Do you call the method?
Nallaekul Nallaekul

2018/9/13

#
I dont completely understand what you mean. ive added the code before in but no luck.
danpost danpost

2018/9/13

#
Nallaekul wrote...
So ive added that code into myworld and have changed actor to Ogre (which is my enemy) when i kill the enemy its not respawning, any ideas?
You do not have to change the method at all. Any actor passed to it, whether of Ogre type or not will be initially placed at a random edge point. You will need to call this method from where you remove an ogre from the world (when one is killed):
((MyWorld)getWorld()).addActorSomewhereAlongAnyEdge(new Ogre());
getWorld().removeObject(this); // removing killed ogre
You need to login to post a reply.
1
2