Change blood color with SetActorProperty?

Moderator: GZDoom Developers

Post Reply
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Change blood color with SetActorProperty?

Post by Nevander »

I noticed one property missing is BloodColor, and I could make use of it in a map I am working on.

So... SetActorProperty(tid, APROP_BloodColor, "RR GG BB");

Thoughts? The alternative would be to duplicate a monster through inheritance and then change the BloodColor property but an ACS solution would be handy too.
User avatar
Rachael
Posts: 13934
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Change blood color with SetActorProperty?

Post by Rachael »

I'm willing to do this, but as I don't have the reins on the project I do not know Graf's present feelings towards exposing things to ACS like this. That being said, don't be surprised if someone suggests using ZScript - I believe it can be done, there.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Change blood color with SetActorProperty?

Post by Graf Zahl »

The blood color is not a changeable property. It's an index into a limited pool of palette translations. Creating one is not a cheap operation and there is no bookkeeping to keep the amount manageable.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Change blood color with SetActorProperty?

Post by Nevander »

That was my worry actually since the wiki basically says that but I wasn't sure if it couldn't be changed at all in game. I ended up creating an inherited version of the monster I want to change so there's always a way.

Out of curiosity, why is it that blood colors are limited? Or rather what is it about them that makes them limited and not a cheap operation as you said?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Change blood color with SetActorProperty?

Post by Graf Zahl »

First, there needs to be a full translation table being built.
Second, they are encoded as a 32 bit value, with 8 bits for R, G, B and translation index each. So currently there can only be 256 of them.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”