Skip to main content
gamedev.net
🔒 Locked

Attack who?

Started by DarkMage139 0 replies 550+ views
Original Post
DarkMage139
DarkMage139
I'm currently writing a Final Fantasy VII battle engine (primitive version) and I've come across a problem. I don't know how to get an entity to attack another! I've worked with this engine type before, but they were one on one fights, not three on three. The characters and NPCs don't know how to pick an "attackee". I plan on calling the classes like
        
CCharacter* cloud = new CCharacter(PC_CLOUD);
CCharacter* barret = new CCharacter(PC_BARRET);

CMonster* sephiroth = new CMonster(MONSTER_SEPHIROTH);
CMonster* jenova = new CMonster(MONSTER_JENOVA)
        
Any suggestions? - DarkMage139 "Real game developers don't change the rules. Real game developers don't break the rules. Real game developers make the rules!" "Originality (in games) is the spice of life!" Edited by - DarkMage139 on 6/26/00 9:11:08 PM
DarkMage139
Ferinorius
Ferinorius
All right, in my engine, I have the monster randomly pick who it attacks when it''s time bar fills up. This is only for a filler, and will be replaced later on.

What I plan to do is make it based on three things. HP, LEVEL, and LAST ATTACK.

The monster will look at each player''s HP and see who has the least amount. If one is really close to 0, it may or may not attack that person. It will see who has the higher level and attack the person with the higher level, hoping to take away the strongest opposition. Also, if none of these suit him, he will attack the last person who attacked him. It''s all pretty much random, and I still don''t even like this idea, but it''s a step into making monster AI

I think we should put our heads together and see what we come up with.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.