Finalizing Project: NewAutoColor.scar!
Hello,
NewAutoColor works. I would like to see more (symbol) colors in it, though.
How can you add a color?
You need to start at one world. Make sure you get a loading screen.
After the loading screen, pick one of the colors(C_Old1) that are already in the NewAutoColor array, let's take the grey rock in this example. Pick the color that you would like to add (C_New1).
Switch to a new world. (Make sure the applet loads again)
Get that annoying loading screen so the colors with get their constant value.
Pick the grey rock color again([B]C_Old2). Pick the other color that you would like to add. ([B]C_New2)
You should only add the color if it has a constant relationship with, in this case, the grey RockColor.
Which is true if: (C_Old1 - C_New1 = C_Old2 - C_New2)
Now, you cannot just add it to the array, because all the colors in the newAutoColor array are picked from one world (or picked from a different one, and adepted afterwards.)
Let us now adept the color.
Taken from NewAutoColor.scar:
SCAR Code:
{Note by Sumilion :
All colors in this list are from the same world. Might you find a
new color that fits in here aswell, and if you add it from your
world it will not work. What you should do then is get the constant
difference between your color and an item in this list (from your
world). Then apply that difference to the color that is set in this
list. You will the have the color like it should be in the world
these colors were taken in at the time.
}
So, what we do now is copy the Grey RockColor(5790810) from the array.
SCAR Code:
srl_refColors[1].Name := 'Grey Rock';
srl_refColors[1].Color := 5790810;
We either take C_Old1, or C_Old2.
Now, we can get the 'difference'.
If we use C_Old1, the color we will add to the array will look like this:
SCAR Code:
NewColor := C_New1 + (C_Old1 - 5790810}));
{5790810 = grey rock color from old array}
If we used C_Old2, it would look like this:
SCAR Code:
NewColor := C_New2 + (C_Old2 - 5790810}));
{5790810 = grey rock color from old array}
One final note.
If you are going to add SymbolColors, make sure you 'pick' the symbol colors that SRL GetSymbolColor returns.
I hope you can help us add more colors to this wonderfull include!
~Wizzup?