This sprint, I worked on some upgrades to the heavy enemy, some touch-ups to the wave system, as well as ensuring that the player will always see the tutorial once before they first play the game.
Starting off with the heavy enemy, feedback indicated that it felt too similar to the medium enemy. They were essentially the exact same, except one was bigger and shot more rapidly. In order to further differentiate the two, we decided to give the enemy a burst-shot, as well as a unique ground slam ability that would hinder the player for getting too close.
For the burst fire, I decided to use a delay loop that would retrigger until int Burst Index reached 0, decrementing it at the end of each loop. At the end of the loop, an event is called that notifies the AI controller that the burst fire sequence is complete.
I think that in the future, it might be better to take another stab at this using a timer handle, and probably some more descriptive function names than “FireProjectile” and “Shoot”. In this case, FireProjectile is the function that starts the burst fire sequence, while Shoot is the function that actually spawns the projectile and assigns it a velocity.
Within the Shoot function, I’m finding the vector that points from the current actor’s firing point to the target vector input. Then, I spawn a projectile, assign it a rotation, and after a validity check, assign it a damage value based on the enemy’s stats within the data table.
With all this set up, I had the burst fire working exactly as intended! I could easily modify the amount of shots, as well as the delay between them.
The second thing I want to share from this sprint is the Heavy Enemy’s ground slam ability. When the player gets close to the Heavy, we want it to slam the ground and create an area on the floor where the player will take damage and have their movement hindered.
My approach here is again not the best I feel, I was aiming to just get something working quickly so I could start testing the slam ability. I’m tracking the cooldown of the slam using a timer this time as well as a boolean (so that the Behavior Tree can look at this bool and know if the slam can be used or not). When the slam event is called, I’m spawning an actor, delaying for 1 second to stop the Heavy from acting again immediately after the slam, and then notifying the behavior tree that it can act again.
For the slam itself, I’m spawning a big cylinder on the ground that will damage the player. To ensure that the player isn’t taking continuous damage, I have a boolean that tracks if the player has already taken damage from this slam instance. We also want the slam to hinder the player’s movement, but that will require some cooperation between me and my co-programmer who has done all the work for the player controller, including the speed, dash, and other movement abilities. I haven’t had the chance to work with them during this sprint, and so I’m going to do that first thing next sprint.
This is what the slam currently looks like!
Right now the slam doesn’t really feel much like a slam, with just a red circle appearing on the floor when you get close to the Heavy. Without animations, the easiest option available to me to better communicate the idea of a “slam” is through VFX, which is the last major thing I worked on this sprint.
My idea for this effect is that this ring will expand from the heavy enemy until it shows the full radius of the ability, acting as a warning before the slam is actually triggered. After the ring has reached its full size, I want to repurpose some of the alpha’s I made for the muzzle flash in order to create an impact effect, like the ground is being struck. At that exact same moment is when I’ll spawn the slam ability. So far I’ve only been able to get the ring part working (By creating a decal material consisting of a sphere mask subtracted by another, smaller sphere mask). But I intend to implement the rest of this idea in the upcoming sprint.
Comments
Post a Comment