Pt 8: Updated Bullet Collsion

10 0 0
                                    

09/04/2023 - Took a break from my recent Baldur's Gate 3 addiction (I'm pretty sure I've pissed off half the NPCs in my party) and decided to finally tackle bullet collision. I've got a few videos on my Youtube channel that show its a bit... spotty.

Did a bit of digging and basically found that I was doing something weird, or at least I think it was weird:

Pull trigger > Bullet launches
Bullet detects if hitting a zombie - if so: call an update to the zombie script to reduce HP by preset damage value and destroy bullet.

So what I THINK was happening was that there was a 50% chance of the bullet deleting before the zombie health script updated.

I've basically reworked the enemy AI script that controls the collider to update the health instead when a bullet enters the collider - this way there is no risk of the bullet deleting before its too soon. I've already seen a dramatic uptick in failed readings of the bullets hitting. I also added a little laser sight to the Pistol - mostly for testing, but I also think it looks cool and it helps to have it as a buff to the weak gun.

Now I just actually need to properly implement the following and I could have a theoretical demo:

--Wave logic/scaling
--Score tracker (also used for currency in a way to get weapons/ammo)
--SFX
--Ammo UI
--at least 1 new weapon

There is also one more feature I want to add, but it might be a bit divisive in what it adds to the game - I just think it would look cool. And if I could figure it out, Wii style aiming with bounding box.

Zombies and the One Hand Army - Dev LogsWhere stories live. Discover now