There are these ints calles “FOG_COLOR_?” - has anyone figured out a way to convert a specific color into an int? I thought it’s just a color hex but it’s not…
They look like hex colors to me.
Example
FOG_COLOR_RED = 16711680; // or 0xFF0000
FOG_COLOR_BLUE= = 255/ // or 0xFF
FOG_CLOLR_GREEN=65280; // or 0xFF00
Yes they are just hex colors.
You should be able to enter the color you want in hex just use the 0x prefix.
example:
int FOG_COLOR_CUSTOM = 0xff253e;
Doesn’t work - SetFog requires an INT - 0xff253e is a string since it contains letters.
nope I just compiled one.
use the 0x (Zero)x prefix and it will work. at least in the original toolset script compiler. once you type the 0x it should turn red. letting you know it is a number.
Nope. I just compiled one. I get parameter error.
I did find a way to convert it on my own, though. It takes a couple minutes for the scirpt to find me the color I want, but it woks.
ginc_math has HexStringToInt
Just noticed that I am on the NWN2 forum not the NWN1 one. Push come to shove you can always convert the hex number to an int. Just open your calculator that came with your OS. Select the Scientific or programmer option according to the version of your OS. and type your number in with the hex option selected then click the dec button to convert.
Happens to me all the time. The new format makes it easy to jump into the wrong section without realizing it.
It’s likely a leftover from nwn1 and may not do anything.
Nah - it works fine, but you need to put that int.
I also wanted a “non-hex” specifiacally 'cause I was hoping that maybe I could make a fade effect from color A to color B, but that’s just not happening…
Anyway, I got what I needed I now have a White Dragon in my module who can summon a blizzard with “Control Weather” spell