I haven’t written a blogpost in HOW long?!
|
Oh Christ, i thought i had written a post at least last Wednesday or something. So anyways, basically everything in the last post is now invalid, we had full overtime all of last week and the game is starting to come together. Some of my own main progress include: throwing the previous changes to Harakat out the window, implementing a 3D HUD, making the Lock-on system target the enemy closest to the center of the screen rather than the closes to the player, trying to figure out why enemies would not get hit by the basic fireball from head on, making the marker over a targeted enemy also display it’s health, creating functionality for the targeting system to swap between targets to the left and right of the currently targeted enemy and cleaning up the AIGuardCharacter plus some other blueprints in the PlayerCharacter. Each of these are segments which on their own could be the subject of a blog post but we have been working so late last week that I’ve neglected writing a daily blogpost. Instead i’ll touch briefly on one of them of which i am particularly satisfied with. This is the way i created to change from the currently locked target to the next closest target to the left or right depending on input. This is the function i am the most satisfied with so far, it is run once when the player moves the right stick to either left or right(originally the two bumper buttons) and takes a boolean depending on what direction. The function starts by calling every target on the level and running them through a series of checks to see if they are valid if any check fails, the object is dismissed and the loop checks the next object in the list, The checks are first if they are within distance to the player, then if it is in front of the camera (by measuring the angle to the cameras forward vector), the path then splits depending on what the input boolean is. The currently checked node is then checked if it is closer to the camera’s forward vector plus 60 degrees to the right of the one 60 degrees to the left. If the node is on the correct side of the camera’s forward vector the check continues. The next check looks at whether the current “Nominated Target” is valid, I.E. if this is the first target to make it this far, if Nominated Target is invalid, the currently checked target becomes Nominated Target. If Nominated Target is valid, the final check is done, This check compares the compares the currently checked target’s distance to the center to the screen (Camera’s forward vector) to the same distanced of the Nominated Target. If the new target is closer it becomes the new Nominated Target. Finally at the end of the loop if Nominated Target is valid it cleans up the Current Locked target and initializes the healthbar marker for Nominated Target who then becomes Current Target. The reason i am the most satisfied with this method is that it not only works but also because i managed to keep it clean and readable through the entire process. Today I did a lot of cleaning up in a couple of the blueprints and they just became so much more eligible and easy to understand, i guess i am a neat freak when it comes to this. But, i might make a quick blog post about it tomorrow rather than write something lengthy. |
