Corona-cation (Day 0)
Git Commit: 9e45555
"Enabled plugins, Added enemy health bar, Finalized cleric"
Enabled plugins:
I just enabled the SmoothSync plugin for later use as well as the SurfaceFootstepSystem plugin. I also disabled the VR plugins because it was annoying having SteamVR open every time I opened the editor.
Added enemy health bar:
More substantial than enabling plugins was the health bar that I made for the enemies. This health bar is connected to a socket on the mesh so hopefully it will look better by moving relative to the animating mesh. The major feature of the bar though was that it would only show when the player is looking at the enemy (I still have yet to disable this through walls) and will rotate to always face the individual players.
Finalized cleric:
After I made the health bar I decided now would be a good time to make sure that the players can do damage and kill the enemies correctly. I started out with the sharpshooter and everything went according to plan. The only thing I changed with him was that if you kill an enemy that is caught in the lasso the game would throw errors. To fix this I just removed that enemy from the array of lassoed enemies if it was killed. I then moved on to the cleric.There were two things that I hadn't implemented yet. From the design doc these were, "[Mana] bar will gradually refill over time but at a very slow rate (10% refilled after 30s)" and "Pray over corpses refills the [mana] bar (1 corpse = 10%)". The mana refill was relatively easy, just running off tick.
Now, when I had finished this I tested the heal spell just to make sure it hadn't broken. It all went fine until it came to the part where if mana is depleted, the cleric can use health to cast the spell. What actually happened was that the mana would go to 0 but the health just would not go down, no matter what I did. I just need to vent a little here about how incredibly stupid the solution was. I cannot express the frustration and anger I felt when trying to debug this. I had watched every value, changed execution flows, and prayed to every god imaginable but it refused to work. After just over two hours I said "screw it" and just deleted the Health variable, replacing it with a fresh one. AND THAT @!$*& WORKED!!! I was even more confused after that. So apparently that old health variable had decided to just straight up ignore my set calls meaning that the health would never deplete. Now it works though and I am so relieved.
Comments
Post a Comment