Bug? or just how it is

This may or not be something that is broken, but it is unexpected and reproducible.

Down in this thread: ProffieOS7 Style Library Phase 3 (Early Access) Q & A
I was making a SparkTip extension that changes the spark size over the course of the blade. Since spark size/ wave size is only calculated at the start of a transition, and not updated throughout the transition, I couldn’t use an existing TrSpark or similar to achieve this, so I manually made an animated bump shape. It is layered outside/above the InOutTrL for reasons.

It works fine, however for some reason it is also running at preset change like EFFECT_NEWFONT would do… but the only effect involved in the style is EFFECT_IGNITION. Additionally, it only does it if preset change is done within the first 3-5 seconds or so after the last retraction. If additional tim passes while preset changes are continued, it no longer shows, seemingly after some sort of timeout.

Is there something running for a few seconds after blade off that might cause this?
There are no postoffs so that takes that out of the equation.

I worked around it by nesting the bump in an IfOn<> controlled AlphaL which does hide it, but it feels like a workaround for sure.

Here’s the style and a video to help show/explain.

StylePtr<Layers<
  Mix<Int<3000>,Black,Red>,  
  InOutTrL<TrWipeX<WavLen<EFFECT_IGNITION>>,TrWipeIn<500>>,
  AlphaL<White,Bump<Trigger<EFFECT_IGNITION,WavLen<EFFECT_IGNITION>,Int<100>,Int<1>>,Scale<Trigger<EFFECT_IGNITION,Int<1>,Int<1>,Percentage<WavLen<EFFECT_IGNITION>,80>>,Int<0>,Int<15000>>>>
>>()

I believe the Trigger<> function is running to completion, that’s why it’s only around for a short time after the change.

Blade effects are pushed on a fifo, and normally we keep track of effects that have already been “found” so we don’t show them again. However, that tracking is lost when the style is reset, so the effect is found again, and thus triggered again.

Easily fixed by cleaning out the fifo when a new preset is selected. (Fix is on github, please try it.)

Thanks, I had thought that, but the time is well expired by then.
I know I’ve had preons linger if a blade is turned on and off quickly.
That’s when I got into using IfOn<> to block them from showing unexpectedly.

Yep. That did the trick, thanks.