> In between these two there should not be any new values coming in. Nothing is
> happening right??
Correct. So `pal1R == pal2R`, etc, after loading them both. And so the `while`
loop will only run once.
> Somehow, this transitions from the default palette to the selected one
By "selected one" I suppose you mean `anyotherpalettethanthemapsdefault`?
`update palette` will cause any modifications to the palette (including from
`load palette` and `tweak palette`) to be displayed on the screen. However
because you placed it before the `load palette`, it won't display the loaded
palette, unless you're running the `weathertest` script twice? I think that's
probably what you're seeing. (Make sure you've read the top of the [Master
Palette and Screen Fades
section](http://hamsterrepublic.com/ohrrpgce/docs/plotdictionary.html#Master%20Palette%20and%20Screen%20Fades))
Also, `load palette` also changes UI colours, and that effect happens
immediately, without needing an `update palette`.
The whole script is very strange, to the point that I can't see what you're
actually trying to do. Are you trying to do one step of fade to a different
palette, using `tweak palette`? So this script will be run repeatedly until the
displayed palette matches the target palette? If so, you should put the `update
palette` at the end of the script, and the `load palette` at beginning, both
outside the `while`. And you should be looping `for (colornum, 0, 255)`, not
using a `while` loop.
Also, the commands you're trying to use aren't compatible.
You can't use `extract color` on the return value from `read color`. It's for
use with the `get color` command. `read color` return red, green or blue values
directly.
Also, `tweak palette` uses R/G/B values from 0 to 63, so don't mix it with
commands that use R/G/B values from 0 to 255, such as `read color`/`extract
color`. I recommend avoiding it.
I could show you how to write the script, if I knew what you wanted to do.
--
Reply to this email directly or view it on GitHub:
https://github.com/ohrrpgce/ohrrpgce/issues/1272#issuecomment-2381100672
You are receiving this because you are subscribed to this thread.
Message ID: <ohrrpgce/ohrrpgce/issues/1272/[email protected]>
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org