I want monsters to rush toward my character. Can someone help?
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
28th January, 2010 at 08:51:20 -
We'd like to help, but maybe you could give us a bit more information about your game. What sort of game is it? Platform? Top down shooter? What do you mean by "rush" ?
Of course, sorry about that. It's a 2D (bird's eye view) RPG and I want the monsters to walk toward me when I enter the room.
EDIT - I have a question to go along with this one now. Some how every frame is white for me now. Any clue what happened? The last thing I did was messed with global values, then I made a town portal and used it now I can't do anything. Any suggestions?
Find something that's most like the game you want to make. See how they do it. Then try to copy it for yourself.
Oh, and I have no idea why every frame is white. It shouldn't happen and has never happened. Maybe you accidentally deleted everything in the frame(s) or accidentally made a new app? Or you might've moved everything inside the white part of the frame far outside it or something.
Edited by Muz
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Is the game tile based (4 or 8 directions) or do the enemies have free movement?
Determining what direction for them to face is simple, since you just need to compare x and y coordinates or use the "face object" method if using free movement. But usually it's not a good idea to make the enemies face the player directly or all the time, since that will just result in a game where your character attracts enemies like a magnet = horrible.
Usually, for RPG (Zelda?) like gameplay, you'll want to program a semi-random "patrol" pattern for your enemies, where they once in a while (on random occasions) plan their movement related to your player's position, or have them automatically notice the player when he's close to them.
Try playing Zelda 3 (A Link to the Past) and watch how each different enemies move while wearing your "tech glasses" - I think it's a really good example of basic 2D enemy AI.