How to keep PalFX lasting forever?

Started by ❊ Ivory ❊, July 28, 2026, 02:03:14 PM

Previous topic - Next topic

❊ Ivory ❊

Hello, I am having an issue where I'm trying to make a PalFX for my character last forever and always override other PalFX. I tried using persistent = 1 but it didn't work. Here is my code:

[State 4750, 12]
type = PalFX
trigger1 = AnimElem = 28
time = -1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 1
color = 0
persistent = 1


And here is how it looks in-game, as you can see the PalFX just disappears once another PalFX is spawned:



I also wonder if it's possible to do the same with AfterImage.
Fighter Factory 3 >>> Fighter Factory Studio.

PotS

For PalFX you need to renew it every frame. Or every x frames. Instead of only calling it once with a long time.
For AfterImage I think that won't work. Every new one overwrites the last one. So what you can do is not call new ones while some variable is active.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.

❊ Ivory ❊

Quote from: PotS on July 28, 2026, 05:31:45 PM
For PalFX you need to renew it every frame. Or every x frames. Instead of only calling it once with a long time.
For AfterImage I think that won't work. Every new one overwrites the last one. So what you can do is not call new ones while some variable is active.

Thanks, but what do you mean exactly by renewing it every frame? If you mean by doing trigger1 = 1, i just tried that and it still wont work. As for the AfterImage, what i mean is i dont want any opponent's attacks to be able to affect the AfterImage, it should renew every frame too, and also same thing with the PalFX
Fighter Factory 3 >>> Fighter Factory Studio.

VictorCYBR

Probably enemy PalFX will still override, but you can experiment using a variable + palfx in the -2 states.
Statedef -2 is always happening, even in custom states. Set a variable with the conditions for the PalFX to be on. Then Put a PalFX with trigger1 = var(x) = 1.
You can also try the same with the afterimage.

❊ Ivory ❊

Quote from: Lyrica on July 28, 2026, 11:32:39 PM
Probably enemy PalFX will still override, but you can experiment using a variable + palfx in the -2 states.
Statedef -2 is always happening, even in custom states. Set a variable with the conditions for the PalFX to be on. Then Put a PalFX with trigger1 = var(x) = 1.
You can also try the same with the afterimage.
Nice catch, but I tried it:

states.cns:

[Statedef -2] ;Used to constantly reset the PalFX of Fire Mayhem.
type = S
ctrl = 0

[State -2, 1]
type = VarSet
trigger1 = 1
v = 33
value = 1


h-attacks.cns:

[State 4750, 12]
type = PalFX
trigger1 = AnimElem = 28
trigger1 = Var(33) = 1
time = -1
add = 240,50,0
mul = 250,224,120
sinadd = 110,55,85,10
invertall = 1
color = 0


And for some reason it doesn't work now, the PalFX just doesn't appear at all  :thinking:
Fighter Factory 3 >>> Fighter Factory Studio.

VictorCYBR

The PalFX should be on -2, not the varset.
This is how it should go:

In the super move state, set var(33) to 1, with trigger1 = animelem = 28.
In statedef -2, set the PalFX with trigger1 = var(33), and no other trigger.
You'll need to reset var(33) (set it to 0), maybe when the round is over, otherwise it will carry to the next match as well.

❊ Ivory ❊

Quote from: Lyrica on July 29, 2026, 01:58:26 AM
The PalFX should be on -2, not the varset.
This is how it should go:

In the super move state, set var(33) to 1, with trigger1 = animelem = 28.
In statedef -2, set the PalFX with trigger1 = var(33), and no other trigger.
You'll need to reset var(33) (set it to 0), maybe when the round is over, otherwise it will carry to the next match as well.

Alright thanks, that worked, but I've ran into 2 other issues now. The PalFX isn't animated/doesn't flicker anymore, and the AfterImage doesn't appear, probably due to getting reset every tic. How would I fix that

Fighter Factory 3 >>> Fighter Factory Studio.

VictorCYBR

Try changing the trigger to this:
trigger1 = var(33) && !(time%10)

I used 10 because it's the time you used in sinadd. So it "resets" after 10 ticks.
This will keep the animation, but from my tests, other PalFX will override it then play again after is finished. Unfortunately I don't know another method.
The same should go for the afterimage. Use trigger1 = var(33) in statedef -2, and it should be good.

❊ Ivory ❊

Quote from: Lyrica on July 30, 2026, 06:19:39 AM
Try changing the trigger to this:
trigger1 = var(33) && !(time%10)

I used 10 because it's the time you used in sinadd. So it "resets" after 10 ticks.
This will keep the animation, but from my tests, other PalFX will override it then play again after is finished. Unfortunately I don't know another method.
The same should go for the afterimage. Use trigger1 = var(33) in statedef -2, and it should be good.

Thanks, it now completely works



Fighter Factory 3 >>> Fighter Factory Studio.