I also added the ability for a friendly fire option (for one of my next projects.) This brought a bug back out that I had gotten around earlier. When I first added the hostility value, you would hurt yourself (I had forgotten to test the hostility in the coldet code.) Well, I added weapons back in and boom, I could kill myself when friendly fire was on lol. So, I added an "Owner" value to bullets and I check to see if the bullet it mine before continuing.
Time for pickups!
Wewt, got pickups back in. However, I modified them a lot. Originally I had it setup in a hierarchy system [BasePickup - WeaponPickup, ItemPickup, AmmoBoxPickup] and this worked well, but it wasn't very flexible and limited me to those 3 pickups. So, I switched to scripting. Here's my test 'handgun.weapon' script file in action:
And here's the script:
GiveAmmo(Entity, "HANDGUN", 100);
SetEntityMessage("Zombie", "HE'S GOT A GUN!!! RUN FOR YOUR LIVES!!!", 10);
SetEntityMessage("Zombie2", "MY LEGS AREN'T WORKING. OH GOD!!!", 10);
So, technically now the Pickup class should be renamed Event or something, but oh well. I might do that later on.
On to...something else! Just have to figure out what is left do first lol.
Waiting for my friend to show up because I have no idea where I'm going -_-.
A couple of you noted that the main menu button didn't work on the pause screen. Well, now it does :). Before I was having access violation errors when I sent it back to the intro state, but I've gotten those all fixed and it works perfectly.
I also added in an OnDeath() script method for entities. Now, when the main character dies, it brings up the paused menu (I need a way to lock it up though; so you can't just unpause the game. Though, don't really have to worry about it because you can't do anything anymore.)
I realized earlier though that I left out one important aspect of the game: lives. Atm you have one life and that's it lol. I honestly hadn't even thought about this until today. So, I guess I have to work that in before I go on.