• entries
    707
  • comments
    1173
  • views
    432938

Untitled

Sign in to follow this  
Programmer16

59 views

Got weapons and bullets back in as well as hooked up to the script system.

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!

3:20pm
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:

function OnCollision(Entity)
GiveWeapon(Entity, "HANDGUN");
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);
return true;
end




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.

5:07pm
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.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now