A flag to disable custom player colors

Moderator: GZDoom Developers

User avatar
Cutmanmike
Posts: 11347
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

A flag to disable custom player colors

Post by Cutmanmike »

A simple flag such as +NOPLAYERCOLORS to disable the player.colorrange altogether and allow translations to be set by DECORATE or ACS.

My reason is simple, I want my player class to change color depending on what weapon he has. Other uses could include color changing armor etc.
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Re: A flag to disable custom player colors

Post by Kate »

I don't see why you can't just use player.colorrange 0 0. It even says that should disable the player color translation [wiki=Classes:PlayerPawn]in the wiki[/wiki]. And if that doesn't actually allow another translation to be applied, sounds more like a bug that it should.
User avatar
Cutmanmike
Posts: 11347
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Re: A flag to disable custom player colors

Post by Cutmanmike »

I was thinking there's some technical reason why it doesn't work, which is why I suggested it. Either way is good.
User avatar
Xaser
 
 
Posts: 10773
Joined: Sun Jul 20, 2003 12:15 pm

Re: A flag to disable custom player colors

Post by Xaser »

If all else fails, you can always pick a range that's not used in the player sprites at all. Setting it to 255,255 (that ugly shade of off-pink) could be a good bet, since it's very unlikely said sprites will ever use that color. And even if they do, just find some other unused range and you're all set.

Not an ideal solution, but it works in a pinch.
User avatar
Cutmanmike
Posts: 11347
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Re: A flag to disable custom player colors

Post by Cutmanmike »

Hotwax reckons he's got this sorted and it actually works, so this might be a pointless request. Will let you know.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49183
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A flag to disable custom player colors

Post by Graf Zahl »

It's not that easy. Player.Colorrange cannot be used for this because it would affect a few other things, too.

However, since there already is a DONTTRANSLATE flag which currently is only used for blood we can use this to disable translations completely for certain player classes and let them keep a DECORATE translation.

Keep in mind though that generally disabling player translations is something that should only be done if your mod does not support multiplayer!
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends

Re: A flag to disable custom player colors

Post by XutaWoo »

Is this flag allowed to be changed in realtime?

As in, using an item to override the player's color, then switching back to their regular color?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49183
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A flag to disable custom player colors

Post by Graf Zahl »

No, that won't work. It only has an effect when the player is spawned.

Return to “Closed Feature Suggestions [GZDoom]”