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

How to show weapon pieces of custom 4th weapon on HUD in Hexen (Zdoom)

Recommended Posts

Hi people. I modified Quietus (Fighter's 4th weapon) by making a new actor called "FWeapQuietusNew" that inherits from and replaces original weapon "FWeapQuietus"

 

ACTOR FWeapQuietusNew : FWeapQuietus replaces FWeapQuietus
{
	Weapon.AmmoUse1 12
	Weapon.AmmoUse2 12
	States
	{
		Fire:
			FSRD DE 2 Bright Offset(5, 36)
			FSRD F 2 Bright Offset(5, 36)
			FSRD G 2 Bright Offset(5, 36) A_FSwordAttack
			FSRD H 2 Bright Offset(5, 36)
			FSRD I 2 Bright Offset(5, 36)
			FSRD I 8 Bright Offset(5, 150)
			FSRD A 1 Bright Offset(5, 60)
			FSRD B 1 Bright Offset(5, 55)
			FSRD C 1 Bright Offset(5, 50)
			FSRD A 1 Bright Offset(5, 45)
			FSRD B 1 Bright Offset(5, 40)
			Goto Ready
	}
}

 

I also created new weapon pieces that inherit from original Quietus pieces but changed so that they act as pieces for the new Quietus.

actor FWeaponPiece1New : FighterWeaponPieceNew replaces FWeaponPiece1
{
	WeaponPiece.Number 1
	States
	{
		Spawn:
			WFR1 A -1 Bright
			Stop
	}
}

actor FWeaponPiece2New : FWeaponPiece1New replaces FWeaponPiece2
{
	WeaponPiece.Number 2
	+FLOATBOB
	States
	{
		Spawn:
			WFR2 A -1 Bright
			Stop
	}
}

actor FWeaponPiece3New : FWeaponPiece1New replaces FWeaponPiece3
{
	WeaponPiece.Number 3
	+FLOATBOB
	States
	{
		Spawn:
			WFR3 A -1 Bright
			Stop
	}
}

 

The weapon pieces work fine and give me the new modified quietus. Only the HUD is not showing the pieces when I obtain them. How do I make them show?

Share this post


Link to post

It's possible. Idk if you are using zscript HUD or SBARINFO, but in SBARINFO you would just add InInventory blocks and draw an image if the player has a piece of the weapon.

Share this post


Link to post
10 hours ago, R4L said:

It's possible. Idk if you are using zscript HUD or SBARINFO, but in SBARINFO you would just add InInventory blocks and draw an image if the player has a piece of the weapon.

 

Thank you. I didn't knew about SBARINFO. But got it working now using it.

 

For anyone else wondering what I did, I created a SBARINFO lump and copied the code from here. Then I added "base hexen;" (without quotation) in the beginning like the comment in code says and replaced all instances of FWeapQuietus with FWeapQuietusNew

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
×