We did it! I literally have no clue how (shame it’s like that but it’s true!) I’ve gotten the targets to fall down when I shoot them! Basically, with my weapons, they do X damage, (or in this case they do 1 damage) and the target has a HP of 1. Once the target hits 0 health points, it will trigger an animation to basically collapse the target, and give me x amount of points, depending on which gun I’ve used (still working on that, and code is below).
So. Here’s the current code, and it works. Here’s a quick gif of the target system working!
Pretty simple, but pretty damn AWESOME! I’m just now working on the UI once I’ve got weapon swapping, then it’s all down to making the world look nice and pretty! (yay…) I’ll probably do one more gun which is for example a shotgun or a sniper rifle. (And yes, I do know about the floating bullets, but that’ll be dealt with at a later stage).
We’ll have to see. I must admit today’s been pretty fun after I got through the whole targets not falling fiasco that has been plaguing me for the past damn week. Damn it feels satisfying. I may perhaps do another blog today near midnight IF I feel I can do some more before going to sleep… We’ll just have to see!