Page 1 of 1

A flag to disable custom player colors

Posted: Sat Sep 05, 2009 8:33 pm
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.

Re: A flag to disable custom player colors

Posted: Sat Sep 05, 2009 9:08 pm
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.

Re: A flag to disable custom player colors

Posted: Sun Sep 06, 2009 8:04 am
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.

Re: A flag to disable custom player colors

Posted: Wed Sep 16, 2009 8:27 pm
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.

Re: A flag to disable custom player colors

Posted: Thu Sep 17, 2009 3:48 am
by Cutmanmike
Hotwax reckons he's got this sorted and it actually works, so this might be a pointless request. Will let you know.

Re: A flag to disable custom player colors

Posted: Sat Mar 06, 2010 3:29 am
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!

Re: A flag to disable custom player colors

Posted: Sat Mar 06, 2010 10:09 am
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?

Re: A flag to disable custom player colors

Posted: Sat Mar 06, 2010 10:21 am
by Graf Zahl
No, that won't work. It only has an effect when the player is spawned.