Hi INF Dev community! One thing that bugged me is that I couldn't display Weapon Names in the lower HUD for custom weapons. Duke's XM8, M16A4, my DE.50AE, none would have a Weapon Name shown.
So I hacked into Duke's Add HUD mutator. And made it work hardcoded. Now I need your help! Will the Programming masters who are working on the INF Weapon Bonus pack make a "fix" to allow custom weapons to have their WeaponNames displayed? If so, tell me now so I can stop working on it!
If not, here's the pseudocode for what I want to do. I need help executing it though:
Ok, so in the original code, the engine checks a list for known weapons and returns the Y value lookup for the NamesIcon.pcx. If it didn't find the weapon name, it returned -1 and quit. So... Here's what I wanted to do! I created:
var Texture CustomWeaponName
My DE.50AE has this line in it's defaultproperties: Texture'SecondWind.Icons.SWDE50Icon'
Now, hardcoded, it gives the result you see in the picture. Yay! But how do I make the engine call the CustomWeaponName value from the weapon in question, then return the value to the WeaponDisplayHUDfix script so it can enter the information and execute it as normal?
I tried this: INFc_Weapon(Weapon).CustomWeaponName but on compile it gave me an error saying that that member did not exist. Of course it doesn't exist in INFc_Weapon! It only exists (so far) in SW_DE50 which extends INFc_Weapon.
Please help! Or tell me to give up and you guys do it!
So I hacked into Duke's Add HUD mutator. And made it work hardcoded. Now I need your help! Will the Programming masters who are working on the INF Weapon Bonus pack make a "fix" to allow custom weapons to have their WeaponNames displayed? If so, tell me now so I can stop working on it!
If not, here's the pseudocode for what I want to do. I need help executing it though:
Code:
// WEAPON NAME
Canvas.SetPos( BaseX + k*WeaponOffset, BaseY );
if( HUDColor != WhiteColor )
Canvas.DrawColor = WhiteColor;
else
Canvas.DrawColor = RedColor;
j = FindWeaponNameY(WeaponSlot[i].ItemName);
if ( j >= 0)
{
Canvas.DrawTile( Texture'InfiltrationUT.NamesIcon',128,12,0,j,128,12 );
}
/* NEW CODE BELOW FOR CUSTOM WEAPON NAMES! */
else
{
Canvas.DrawTile( CustomWeaponName ,128,12,0,0,128,12 );
}
Ok, so in the original code, the engine checks a list for known weapons and returns the Y value lookup for the NamesIcon.pcx. If it didn't find the weapon name, it returned -1 and quit. So... Here's what I wanted to do! I created:
var Texture CustomWeaponName
My DE.50AE has this line in it's defaultproperties: Texture'SecondWind.Icons.SWDE50Icon'
Now, hardcoded, it gives the result you see in the picture. Yay! But how do I make the engine call the CustomWeaponName value from the weapon in question, then return the value to the WeaponDisplayHUDfix script so it can enter the information and execute it as normal?
I tried this: INFc_Weapon(Weapon).CustomWeaponName but on compile it gave me an error saying that that member did not exist. Of course it doesn't exist in INFc_Weapon! It only exists (so far) in SW_DE50 which extends INFc_Weapon.
Please help! Or tell me to give up and you guys do it!
Attachments
Last edited: