Yes this could be done in numerous ways.
it could be done as easy as this:
if ( HP / MAX_HP < 0.2 ) RunAway();
if your healthpoints is below 20% the run away.
In a RTS. If the number of buildings/units is close to 0 it doens't necessary mean that you are about to die, as you could be in a early building stage of the game. I think it would be better to have an AI to strive not to have a total strength below the players strength, and for the sake of not ruining the game for the player, the strenght shouldn't be much higher either.
In other games you might still have a good chance to win even with a superior enemy, as long as you can stay hidden or out of range from your foe.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement