Hello. So I am dealing with a rather nasty and annoying race condition that I can't resolve. I want to set effect for a couple of objects at specific point in a song, then when that moment comes again on the subsequent loops, do it all over again. Basically switch back and forth between effect and no effect. Unfortunately, that gets me this problem - the effect is being turned off basically right after being turn on (on the same frame), resulting in no effect change at all. If I switch the lines around, the effect changes... once. On subsequent loops it's turned on again right after being turned off.
Any help would be welcome.
Code:
* ModPosMS( "ModFX 3: ModFusion eX", 0 ) >= BoomPoint( "BG" )
+ Lastms of BG < BoomPoint( "BG" )
+ BG: EffectOn is on
BG : Set RGB coefficient to GetRGB(255, 255, 255)
Boing : Set effect to "None"
BG : Set EffectOn off
* ModPosMS( "ModFX 3: ModFusion eX", 0 ) >= BoomPoint( "BG" )
+ Lastms of BG < BoomPoint( "BG" )
+ BG: EffectOn is off
Boing : Set effect to "Keep Color"
Boing : Set effect parameter "keep" to GetRGB(255, 255, 255)
Boing : Set effect parameter "replace" to GetRGB(0, 255, 255)
BG : Set RGB coefficient to GetRGB(96, 64, 180)
BG : Set EffectOn on
* Always
BG : Set Lastms to ModPosMS( "ModFX 3: ModFusion eX", 0 )