If a Weapon as a Reload animation like a shotgun, does a counter of the Ammo before reloading can exist ?
Like 8/8 Ammo in charge, and the Total like usually 100.
Let me know, thanks

Code: Select all
Weapon.AmmoType MyShell
Weapon.AmmoType2 TotalShells
Code: Select all
WEAP A 0 A_TakeInventory("TotalShells",1)
WEAP A 0 A_GiveInventory("MyShell",1)
Okay thanks for this, But i was also asking for the Hud Himself,revo794 wrote:It is possible, but you'll need to create two ammo types.
On this piece, the bullet counter is seen below, and the clips counter is above.
So you have to type kind of this:And in the reload piece:Code: Select all
Weapon.AmmoType MyShell Weapon.AmmoType2 TotalShellsCode: Select all
WEAP A 0 A_TakeInventory("TotalShells",1) WEAP A 0 A_GiveInventory("MyShell",1)
Oh Yes thats actually what i wanted,Blue Shadow wrote:You mean something like this? The HUD supports weapons with primary and secondary ammo since v1.6. The procedure to include them is the same as with one-type ammo weapons.
Of course, they are. In fact, there is a test weapon* included in the HUD itself that uses two ammo types. To test it, you can give it to yourself by typing the following in the console:Mayhem666 wrote:But does these graphics are included in the Hud ?
Code: Select all
give nc_dualammotestpistolAgain, it is practically the same as a one-type ammo weapon, except you require to specify the secondary ammo in the array (in the ACS library) as well as the primary. Check to see how the test weapon is implemented.Also, though i added my custom ammo type for new weapons, but to add the reload ammunation i'm not really sure how to proceed,
Blue Shadow wrote:Of course, they are. In fact, there is a test weapon* included in the HUD itself that uses two ammo types. To test it, you can give it to yourself by typing the following in the console:Mayhem666 wrote:But does these graphics are included in the Hud ?
* It is not a fully functional weapon with reload and stuff; it is just a weapon with fire and altfire modes and an ammo type for each mode.Code: Select all
give nc_dualammotestpistol
Again, it is practically the same as a one-type ammo weapon, except you require to specify the secondary ammo in the array (in the ACS library) as well as the primary. Check to see how the test weapon is implemented.Also, though i added my custom ammo type for new weapons, but to add the reload ammunation i'm not really sure how to proceed,

Is there a way to not make the Square appearing whatever the thing is appearing in the inventory?Blue Shadow wrote:That "square" is the background on which the selected portable inventory item is drawn. It is supposed to show up if you have at least one item in your possession. Does the weapon give you such item(s) as a part of its code, by any chance?
Code: Select all
// Inventory Box --------------------------------------------------------------------------------------
// If "Reserve ammo toggle" option is set to on, draw the artibox next to the reserve ammo display
InInventory NC_ToggleAmmo
{
drawselectedinventory alternateonempty, center, NC_CONFDIGITS, -130, -84, -113, -71, untranslated {}
else { drawimage "ARTIBOX", -148, -100; }
}
// Otherwise, move it into its place
else
{
drawselectedinventory alternateonempty, center, NC_CONFDIGITS, -29, -84, -12, -71, untranslated {}
else { drawimage "ARTIBOX", -47, -100; }
}
I don't think it use such a thing, But it use Alt fire in wish it need to give some item ''kind'' for Reload purpose and all that stuff.Blue Shadow wrote:If your mod does not make use of portable items (like in Heretic or Hexen), then I guess you don't need it. In that case, remove or comment out the following code (it is at the very bottom) to prevent it from showing up:
However, if the case is that your weapon "gives" you an item (my guess would be a custom inventory for tracking something) as a part of its code, then it probably can be solved from that side, and not bother about messing with the HUD itself.Code: Select all
// Inventory Box -------------------------------------------------------------------------------------- // If "Reserve ammo toggle" option is set to on, draw the artibox next to the reserve ammo display InInventory NC_ToggleAmmo { drawselectedinventory alternateonempty, center, NC_CONFDIGITS, -130, -84, -113, -71, untranslated {} else { drawimage "ARTIBOX", -148, -100; } } // Otherwise, move it into its place else { drawselectedinventory alternateonempty, center, NC_CONFDIGITS, -29, -84, -12, -71, untranslated {} else { drawimage "ARTIBOX", -47, -100; } }