Pal changes

Started by AkuShadow, December 06, 2020, 01:45:21 AM

Previous topic - Next topic

AkuShadow

I tried using this code for animated palette:

[Statedef -2, Remap]
type = RemapPal
trigger1 = palno = 12
source  = 1, 1
dest = 1,12+ceil(0.19*(GameTime%105))
ignorhitpause = 1 

When I try using this code for another palette it seems to not work or just gives me the base of the other pal for example I tried:

[Statedef -2, Remap]
type = RemapPal
trigger1 = palno = 10
source  = 1, 1
dest = 1,12+ceil(0.19*(GameTime%105))
ignorhitpause = 1 

Used the same number of palettes as 12 and it didnt work and also stopped the other from working.
I got the original code from here:
https://mugenguild.com/forum/topics/glowing-palette-mugen-1-0-141925.0.html

Help me JMorph

AkuShadow

Also is there any way to add a sound to this?

Odb718

Quote from: Goutetsu2 on December 06, 2020, 01:45:21 AMWhen I try using this code for another palette it seems to not work or just gives me the base of the other pal
What exactly does this mean? Which palette becomes which palette?
Does 10 stay 10, does 10 become 12, does 10 become 12 and stay 12?

I'm only assuming you're using the same code for testing.
If you're trying to make 2 different colors pulse, you'd need 2 different groups. 1,12 and 2,12
vVv Gouken718 vVv SabreTooth718 vVv


AkuShadow

#3
Quote from: Odb718 on December 07, 2020, 05:53:50 AM
Quote from: Goutetsu2 on December 06, 2020, 01:45:21 AMWhen I try using this code for another palette it seems to not work or just gives me the base of the other pal
What exactly does this mean? Which palette becomes which palette?
Does 10 stay 10, does 10 become 12, does 10 become 12 and stay 12?

I'm only assuming you're using the same code for testing.
If you're trying to make 2 different colors pulse, you'd need 2 different groups. 1,12 and 2,12


Im using the code twice to try and and make 2 seperate palettes that have pulsing colors.
Pal 10 and Pal 12.  When I tried, the original worked fine but pal 10 starts at pal 10 and scrolls about 3/4th of the way through pals after 12.

Odb718

It not using pals 1,12 - 1,13 - 1,14 - 1,15, and so on is odd.
Did you remove the duplicated code for Pal 1,12 to see if that was stopping pal 10 from using the pulse "palette"?

And for honest testing, duplicate your 1,12-1,whatever palettes to 2,12-2,whatever and make 12 use that.  You may be getting a hiccup because the code actually does make the palette = 1,12. Which might activate the 2nd chunk of code.
vVv Gouken718 vVv SabreTooth718 vVv


AkuShadow

I think I might have fixed it. This one works correctly.
[Statedef -2, Remap]
type = RemapPal
trigger1 = palno = 10
source  = 1, 1
dest = 1,101+ceil(0.19*(GameTime%105))
ignorhitpause = 1   

I know the reason is the change in:
"dest = 1,101+ceil(0.19*(GameTime%105))"
but how does this peice of the code work? If I
changed it to:

dest = 2,1+ceil(0.19*(GameTime%105))

what exactly did I change?