Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
rabidrage

Chainsaw ammo

Recommended Posts

Now that I've gotten the flamethrower more balanced, I want to take advantage of its new ammo type--gas. It makes sense that if the chainsaw had ammo, that would also be gas. The question is, how do I make the chainsaw use ammo at all? I've copied these lines into the decorate entry for the chainsaw I'm using:

Weapon.AmmoType "Gas"
Weapon.AmmoUse 1
Weapon.AmmoGive 40

...but no luck. Still displays no ammo when I run it in the game. I'm thinking it has something to do with A_Saw, but I don't know how to fiddle with that. Is there a simple decorate solution?

I know it sounds like a pain in the ass for the chainsaw to have an ammo type, but I also provide a mace as a melee weapon, and you can get a Berserk Pack as well. So, I mean, this is just for the sake of doing something different/realistic.

Share this post


Link to post

From what I'm reading, it seems like it's working perfectly fine, actually ... it's just that you're not using the right chainsaw.

If you see no ammo display at all for the chainsaw you're using, then it's pretty likely that you're not using the new chainsaw, but the vanilla Doom chainsaw. You might want to make sure it's being properly replaced both on the maps and in the player's weapon slots, both of which require two different methods.

Share this post


Link to post

Well, most of the chainsaw modifications seem to work. I mean, it's the Doom 64 chainsaw, pretty hard to mistake it for another one since it replaces the graphics. And the Decorate entry matches the entries for the Doom 64 shotgun, chaingun, etc., which have been modified to fire at different rates, cause kickback, etc., and all of that works fine.

Here's the chainsaw's full Decorate entry:

Actor 64Chainsaw : Chainsaw Replaces Chainsaw
{
Scale 0.82
Weapon.UpSound "null"
Weapon.AmmoType "Gas"
Weapon.AmmoUse 1
Weapon.AmmoGive 40
States
{
Select:
SAWG C 0
SAWG C 0 A_PlaySoundEx ("weapons/sawup", SOUNDSLOT7, 0)
SAWG C 1 A_Raise
goto Select+2
Ready:
SAWG CD 5 A_WeaponReady
Loop
Fire:
SAWG AB 2 A_Saw
SAWG B 0 A_ReFire
Goto Ready
}
}

Share this post


Link to post

SAWG is the sprite for the default chainsaw, and you haven't changed any of the sounds in the code, so it's entirely possible that you just think you're using the new chainsaw because it sounds and looks like it's supposed to; after all, the replaced sprites and sounds are affecting the vanilla chainsaw, too.

The weapon itself looks alright, but make sure the player's weapon slots have been properly redefined, especially if you're testing with the IDKFA or give all cheats; you could also make sure the weapon's actually spawning correctly by putting "summon 64Chainsaw" in the console, where autoswitch should change to it and show it working properly. Then, if the weapon slots haven't been changed, you'll find that you can't switch from it with the next / previous weapon keys, and switching away from it by other means results in you being unable to select it again.

Share this post


Link to post

Yeah, I tried the "summon 64Chainsaw" thing and it still doesn't work. But why would that be the only one that doesn't when all the other 64 weapons work correctly? And where am I redefining the weapon slots, in KEYCONF? Because I've done that. I currently have 13 weapons and can bring up all of them, and they work exactly right except for this one.

I would like to bring up again my point about A_SAW. One of the parameters is listed as this: SF_NOUSEAMMO — No ammo use: Do not use ammo.

http://zdoom.org/wiki/A_Saw

So that is not the problem? Or is it?

Share this post


Link to post

Nevermind. Problem solved. I've created a really confusing situation because of my relative newbie nature. See, I'm working out of two separate files for my WAD which each contain pieces of the data. So there are Decorate entries in both of them and I never know which side I need to edit. Ugh. When my WAD is done maybe someone can clean up all the extraneous crap for me.

Share this post


Link to post

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
×