I have a soundfont where the lockup sound builds up to a sort of overload crescendo. Rather than just looping that sound if you keep holding the activation button, I’m wondering if it’s possible to automatically drop the lockup effect once the end of the sound file is reached. How/could one code that?
Separately, is it also possible to link that event to something like the “cortosis clash” effect from Fett263’s library as a way of punishing the user for pushing the saber too hard? But only if the end of the sound file is reached, not every time they drop out of lockup.
Thanks for the help.
That’s not how Lockup works, you’d have to do a good amount of customization to change that behavior.
Not really clear on what you’re after for the Cortosis Clash but it’s triggered as a Special Ability and tied to the Clash effect, it really doesn’t work with Lockup because it’s a different mechanism. Not sure how easy/hard it would be to connect to Lockup without diving into the code deeper, but it wouldn’t be something the Library currently offers, it would probably require modifying the code a bit.
Cool, thanks Fett263. I’m just recently starting to read the documentation and get my feet wet on the code side of things, so I don’t really know how it works under the hood just yet. Just poking around at the edges to see what’s possible.
Regarding cortosis clash, my question was basically “is it possible to rewrite the code to designate some other event as a trigger for the effect instead of it only being tied to the special ability gesture/clash combo?” E.g. holding lockup for a certain amount of time. I’m too inexperienced to know whether I’d just be bashing my head into a wall trying to rewrite the code to make it work.
Why not rename the lock.wav to a force.wav that way you don’t have to keep the button held and it will play the whole sound file
Depending on your ability to write code anything is “possible”, but it’s not something you can currently do. You’d have to write your own custom code to handle.
Use a different effect other than actual lockup for the blade style and sound, like EFFECT_FORCE with force.wav.
Then you can just time the duration of your visual effect to the sound using WavLen.
Basic example:
TransitionEffectL<TrConcat<TrInstant,
/* Lockup Color / Shape effect */
AlphaL<White,Bump<Scale<BladeAngle<>,Int<26000>,Int<6000>>,Scale<SwingSpeed<100>,Int<9000>,Int<14000>>>>,
/* Duration to show it */
TrDelayX<WavLen<EFFECT_FORCE>>>,
/* What Effect runs this layer */
EFFECT_FORCE>