Set translation for HUD weapons

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Set translation for HUD weapons

Postby Jarewill » Wed Nov 13, 2019 2:22 pm

I'm looking for a way to visually show the chaingun overheating.
Mostly a way to tint the sprite red the more it fires.
I've tried using A_SetTranslation, but that didn't work (I was sure it wouldn't, but hey better to make sure than to be an even bigger idiot later).
Is that even possible via DECORATE? Or do I need to add sprites (either by copying and translating the sprite or by using the TEXTURES lump)?
It would be grand if it would be possible via a function instead, as it would simplify the code and I wouldn't need to make new states for each overheat sprite.
Jarewill
 
Joined: 21 Jul 2019

Re: Set translation for HUD weapons

Postby Cherno » Wed Nov 13, 2019 2:55 pm

I believe the tinting renderstyle (Stencil) was changed a few versions back to what it was originally suposed to be, which is a single opaque color. It'd be great if one would be added, but it's beyond my skills to dabble in the source code.
So: No, there is no gradual tinting.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: Set translation for HUD weapons

Postby Jarewill » Thu Nov 14, 2019 7:59 am

I apologize for not wording myself properly earlier, but I was asking if there was a function similar to A_SetTrasnlation that would work on hud weapons.
This works with how it tints the sprite red, but the thing is that calling A_SetTranslation translates the player instead of the weapon.
Code: Select allExpand view
Overheat2 = "0:255=@30[255,0,0]"

Well, of course it translates the player, I suspected that would happen and the way I was trying to make it work was a far stretch.
So I wanted to ask if there is a function like A_SetTrasnlation that would work on weapons.
Jarewill
 
Joined: 21 Jul 2019

Re: Set translation for HUD weapons

Postby Blue Shadow » Thu Nov 14, 2019 9:22 am

As far as I'm aware, you can't change the color translation of HUD sprites in game.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Set translation for HUD weapons

Postby Jarewill » Thu Nov 14, 2019 11:44 am

I see. Thank you for clearing it up.
Jarewill
 
Joined: 21 Jul 2019


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest