Somehow, this transitions from the default palette to the selected one, even 
though nothing is happening between the two color checks. Is this a bug? It 
does not look like this should work. Sorry if this turns out to be a super 
simple thing and I waste your time, but I genuinely don't understand it and 
tried a bunch of things.

```
plotscript, weathertest, begin

# Initializing the variables used to sweep through the two palettes' color 
values (Red, Green, Blue)

variable (colornum)
variable (fullcolorbit)

variable (pal1R)
variable (pal1G)
variable (pal1B)

variable (pal2R)
variable (pal2G)
variable (pal2B)
colornum:= 0

# Random init values just for them not to match on the first check
    
pal1R:= 99   
pal1G:= 98   
pal1B:= 97   
pal2R:= 96   
pal2G:= 95   
pal2B:= 94   

# Initializing the variables used to fade sound and start the proper ones

while (pal1R <> pal2R && pal1G <> pal2G && pal1B <> pal2B) do

(

update palette
load palette ((anyotherpalettethanthemapsdefault))

# Get RGB values for each palette color one by one using color num as the color 
number

fullcolorbit:= (read color (colornum))
pal1R:= (extract color (fullcolorbit, color:red))
pal1G:= (extract color (fullcolorbit, color:green))
pal1B:= (extract color (fullcolorbit, color:blue))

# In between these two there should not be any new values coming in. Nothing is 
happening right??

fullcolorbit:= (read color (colornum))
pal2R:= (extract color (fullcolorbit, color:red))
pal2G:= (extract color (fullcolorbit, color:green))
pal2B:= (extract color (fullcolorbit, color:blue))

# Deal with Red value comparisons first
if (pal1R < pal2R) then 
(tweak palette (1, 0, 0, colornum, colornum))
if (pal1R > pal2R) then 
(tweak palette (-1, 0, 0, colornum, colornum))

# Deal with Green value comparisons
if (pal1G < pal2G) then 
(tweak palette (0, 1, 0, colornum, colornum))
if (pal1G > pal2G) then 
(tweak palette (0, -1, 0, colornum, colornum))

# Deal with Blue value comparisons last
if (pal1B < pal2B) then 
(tweak palette (0, 0, 1, colornum, colornum))
if (pal1B < pal2B) then 
(tweak palette (0, 0, -1, colornum, colornum))

# Apply changes and repeat if not done
increment (colornum) 

)

end
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/ohrrpgce/ohrrpgce/issues/1272
You are receiving this because you are subscribed to this thread.

Message ID: <ohrrpgce/ohrrpgce/issues/1...@github.com>
_______________________________________________
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to