YanWittmann / rpgengine

A game engine that allows for the creation of text based RPG adventures with battle maps!
1 stars 0 forks source link

When an enemy can't reach the player, the battleMap freezes #13

Closed YanWittmann closed 3 years ago

YanWittmann commented 3 years ago

The problem is not that the enemy can't reach the player but that he doesn't have an inventory.

YanWittmann commented 3 years ago

Added a check if the enemy has an inventory which fixes the problem. It will now try to keep a distance of 5 tiles to the player when it doesn't have an inventory.