What’s going down, Panda Stinkers?
I recently finished the basic attack animations for my Protagonist race and have setup to do the basic ones for the Antagonist race. Before I do those animations, I want to go back and fix-up some things with the combat system; so I did.
For starters, attacks were being triggered too fast; that is, when an actor attacked, they did it constantly without mercy.
Secondly, combat actors were getting too close to each other.
Another thing, there was a loose end with my detection code. The detection was made based on an enemy’s position at the time of the detection, but what if that enemy was moving (and yes….they move)?
What happened was, when an actor moved to attack their enemy, they moved to the first spot the enemy was….even if the enemy was following right behind them (because they moved from the first spot during the detection).
Image Removed
That was an easy fix though; what I did was find a part of the code that was looped and dealt with the combat movement (because I don’t like to create additional tasks/loops if not needed), and inserted an update for the current target’s position.
That made my actors walk towards each other and when they were in range, they stopped immediately and started going at it; which is the way it was meant to be. Sweet!!!
What I did for the constantly repeated attacks is add a wait time. If you ever played RPGs like Xenosaga, Xenogears, Final Fantasy or Legend of Dragoon…then you’re familiar with the attack time of a turn based combat system.
You can say I combined RTS and RPG together (which is what I’m doing with this game), which turned out well because now combat actors will do their nice little battle idle and randomly attack.
Looks way cool!
Of course, how fast a fighter reacts will depend on their level later on. I haven’t written the code for that effect yet. Higher level fighters will not only attack faster, but will chain attacks more.
As far as fighters getting too close; I just had to change four values in my code, which changed the combat range between fighting actors.
What I’m going to do now is randomize the style of attacks for my Protagonist race since I have those basic animations done. Tomorrow, I hope I have time to get at least one other Antagonist race basic animation done, so I can at least structure the random attack for that race.
After I do finish the Antagonist Race’s basic animations, I want to move into getting the game play for level one more complete, so I can add the random battles as a “gamer’s” heroes move through the environment.
Random battles… A true RPG expression.
I won’t get into Skilled Attacks until later. That’s where that AI Building menu I pre-built will come in.
PS,
Can’t believe people have subscribed to my You Tube page. I really wasn’t expecting that. I guess I better add some music to future videos…eh?