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

HUD ammo display (mod weapon)

Recommended Posts

Hello!! Hello? Hello!

I'm trying to make a really silly Doom weapon pack (via Decorate). Right now I'm replacing the Shotgun with a less reliable one and I want to change its max ammo.

I created new actors replacing the Shotgun and Shell items, but I have three problems:

1) The HUD does not display the ammount of new "ammo".
2) I also changed the property Inventory.MaxAmmount to 200 in the new Shell actor, but the HUD doesn't change its value (50).
3) For some reason, even though I have the property Weapon.AmmoUse to 1 the amount of ammo stays the same.

Thank you all, y'all, for your time!

Share this post


Link to post

Of course! Here it is:

Actor UselessShotgun : Weapon Replaces Shotgun 20024
{

Weapon.SelectionOrder 350
Weapon.AmmoType "Shelly"
Weapon.AmmoGive 30
Weapon.AmmoUse 1
Weapon.SlotNumber 3
Weapon.KickBack 80

Inventory.PickupSound "GetIt"
AttackSound "ShootIt"

States
{
Spawn:
YSKU A -1
Loop

Ready:
SHTG A 1 A_WeaponReady
Loop

Deselect:
SHTG A 1 A_Lower
Loop

Select:
SHTG A 1 A_Raise
Loop

Fire:
SHTG A 3 A_Jump(5,"AltFire")
SHTG B 5 A_CheckReload
SHTG B 10 A_PlaySoundEx ("ShootIt","Weapon")
SHTG A 5 A_ReFire
Goto Ready

AltFire:
SHTG A 0 A_CheckReload
SHTG A 2 A_Recoil(100)
SHTG A 0 A_FireBullets (6,0,7,5000,"BulletPuff",FBF_NORANDOM)
SHTG A 0 A_PlaySound("BoomIt",CHAN_WEAPON)
SHTG A 7 A_GunFlash
SHTG BC 5
SHTG CCCC 5
SHTG CB 5
SHTG A 7 A_ReFire
Goto Ready

Flash:
SHTF A 4 Bright A_Light1
SHTF B 3 Bright A_Light2
Goto LightDone

}
}

Actor Shelly : Ammo Replaces Shell
{
Inventory.PickupMessage "$GOTPOOP"
Inventory.Amount 5
Inventory.MaxAmount 200
Ammo.BackpackAmount 10
Ammo.BackpackMaxAmount 400
Inventory.Icon "SHELA0"
States
{

Spawn:
SHEL A -1
Stop
}
}

Share this post


Link to post

When you say "HUD", do you mean Doom's status bar with the mugshot (Doom guy's face) or ZDoom's fullscreen one? If it's the former, then you require to modify the status bar to make it display your new ammo type in place of the original shotgun shells, and to do that you want to use SBARINFO.

Doggo120 said:

3) For some reason, even though I have the property Weapon.AmmoUse to 1 the amount of ammo stays the same.

Weapon.AmmoUse(1) is for primary attack (Fire), while Weapon.AmmoUse2 is for secondary attack (AltFire). To make it work in your case, you need three things:

Share this post


Link to post

Of course!!! The Primary Fire uses no bullets :P

Now, I would like the HUD with the doomguy's face and all to keep track of the max. bullets :)

Gracias!

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
×