Slowly changing stencil color

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Slowly changing stencil color

Post by Apeirogon »

I found set shade function, and after playing a little with it I have a question.
Is it possible to make cacodemon which upon hit slowly change it stencil color to red, and then slowly change it back to default color? And if yes, how to do so?
User avatar
Cherno
Posts: 1337
Joined: Tue Dec 06, 2016 11:25 am

Re: Slowly changing stencil color

Post by Cherno »

No, it's not possible, zDoom does not support a rendering style like this (only Stencil and AddStencil). If you want a simple hitflash effect without smooth color transitioning, I can provide it.
User avatar
comet1337
Posts: 876
Joined: Fri Sep 25, 2015 3:48 am
Location: elsewhere

Re: Slowly changing stencil color

Post by comet1337 »

you could make another actor that follows the caco's position, copies it's sprite and frame, and then fades out after spawning
User avatar
Cherno
Posts: 1337
Joined: Tue Dec 06, 2016 11:25 am

Re: Slowly changing stencil color

Post by Cherno »

comet1337 wrote:you could make another actor that follows the caco's position, copies it's sprite and frame, and then fades out after spawning
If I understand this idea correctly, it would require offsetting the dummy actor by a tiny amount towards the player camera. Possible, but breaks down when viewed from above or below.
User avatar
comet1337
Posts: 876
Joined: Fri Sep 25, 2015 3:48 am
Location: elsewhere

Re: Slowly changing stencil color

Post by comet1337 »

Cherno wrote:
comet1337 wrote:you could make another actor that follows the caco's position, copies it's sprite and frame, and then fades out after spawning
If I understand this idea correctly, it would require offsetting the dummy actor by a tiny amount towards the player camera. Possible, but breaks down when viewed from above or below.
i'm fairly certain that newly spawned actors get priority and are rendered on top if they occupy the exact position of another actor
User avatar
Cherno
Posts: 1337
Joined: Tue Dec 06, 2016 11:25 am

Re: Slowly changing stencil color

Post by Cherno »

Well, the blood pools from the Ketchup mod cause z-fighting when overlapping, so... Not sure bout that.
User avatar
Ichor
Posts: 1784
Joined: Wed Jul 23, 2003 9:22 pm

Re: Slowly changing stencil color

Post by Ichor »

Cherno wrote:
comet1337 wrote:you could make another actor that follows the caco's position, copies it's sprite and frame, and then fades out after spawning
If I understand this idea correctly, it would require offsetting the dummy actor by a tiny amount towards the player camera. Possible, but breaks down when viewed from above or below.
Maybe make the first actor invisible while the second actor runs through its color changes. Then it reappears when the second actor is done.
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: Slowly changing stencil color

Post by Apeirogon »

Cherno wrote:No, it's not possible, zDoom does not support a rendering style like this (only Stencil and AddStencil). If you want a simple hitflash effect without smooth color transitioning, I can provide it.
Meh, dont need to. I self can make such hack, just wants to knows is it possible to make using just functions, without actors.
rayburn
Posts: 45
Joined: Sun Oct 14, 2018 6:30 pm

Re: Slowly changing stencil color

Post by rayburn »

Is it possible with TRANSLATIONs maybe?
I am looking to replicate a similar visual effect. (timestamp 1:41)
UPD. So far the easiest crutch that was ever recommended to me in this regard is simply dropping a colored dynamic light on the monster. But I'd still appreciate your input, if any.
Post Reply

Return to “Scripting”