Log In  

Cart #17617 | 2015-12-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

The palette cycling happens once and then stops, I tried using palt(), but this doesn't appear to reset the cycle. Any pointers would be appreciated!

Here's the code I'm using.

function _update()
 if p>15 then

function _draw()
P#17618 2015-12-09 04:48 ( Edited 2016-02-28 16:07)

Hello there.

With your code, once you've made it through all the colours once, you're then making the same changes again, so no change is apparent.

I'm wondering if you meant to do something more like this?

Cart #17620 | 2015-12-09 | Code ▽ | Embed ▽ | No License

function _update()

function _draw()
 for x=0,15 do

This will keep looping over all the palette entries every frame.

P#17622 2015-12-09 05:38 ( Edited 2015-12-09 10:46)

^ You don't actually need to use modulo (%) with pal() since the function already handles that internally.
It's absolutely good practice to do it, but it's good to know you can skip it if you really really need those 2 tokens for whatever reason :P

P#17630 2015-12-09 11:22 ( Edited 2015-12-09 16:25)

Hi, i tried Solar's palette cycling on a thing, and it turns out that when recording a gif, the palette cycling isn't recorded... Am i the only one or is it some bug?

P#19004 2016-02-28 07:18 ( Edited 2016-02-28 12:18)
P#19005 2016-02-28 08:13 ( Edited 2016-02-28 13:13)

I hadn't seen that post, sorry and thank you. :)

P#19011 2016-02-28 11:07 ( Edited 2016-02-28 16:07)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-02-27 20:35:06 | 0.013s | Q:25