To really fill out our world with new objects and characters, I've decided to add some of our Enemies that we have planned. Our basic melee enemy is already working decent, and its time to shake up our combat with an enemy that will keep our player on their toes. We are accomplishing this by creating an enemy that charges at the enemy at full speed, and rests for a moment before charging again. We got our enemy created and basic functionality done, but there are some issues. The biggest issue is how the enemy behaves.
The goal is the enemy is to locate the player and charge the player at great speeds. The enemy should continue to run until a collision between a wall or a player. If the player is struck, a lot of damage and knockback, but if a wall is struck, the enemy is stunned and cannot act for a moment. So far, our enemy is only charging to the players position. The positions of the enemy and player are subtracted from eachother, and then normalized. Afterward, the normalized vector is scaled to 5, and then added to the destination that should result in a charge that goes beyond the player. I still will need to find out why the enemy does not behave properly, but I will also be moving on to other enemies and see if the issues can be solved there.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.