Is there a way to trigger a lockup without the "Begin Lockup" effect?

Usually a lockup consists of three effects: “Begin Lockup,” “Lockup,” and “End Lockup”, as represented respectively by the “bgnlock,” “lock,” and “endlock” soundfiles and their accompanying visual effects. Normally, this chain of events is triggered by invoking:

SaberBase::SetLockup(SaberBase::LOCKUP_NORMAL);
SaberBase::DoBeginLockup();

But what if I want to bypass the “Begin Lockup” effect and go straight into the lockup itself? Is that possible? Is there a function for this?

No, there is no function for that.
Why would you want to?

I have a prop file with a button configuration that consists of EVENT_PRESS being used to trigger a clash, and EVENT_HELD being used to trigger a lockup. This results in both effects being triggered, but the “Begin Lockup” effect essentially makes it act like two clashes in quick succession. I was hoping to bypass the “Begin Lockup” effect and have the initial clash approximate that effect.

Make a 1 millisecond silent bgnlock.wav file and set the style to just skip it by using a TrInstant function ?

Well, I don’t want to do it for all lockups. Just when triggered by that particular EVENT_HELD control.
What I’m working on is a set of controls that includes triggering clashes and lockups via buttons without having to actually have another saber to hit against, because I’m a big dumb nerd who likes pretending to “duel” imaginary opponents. But I still want to be able to trigger a full lockup effect as normal when holding the aux button during impact.

So it wouldn’t work if you just reversed things a bit?
Have lockup triggered with the press instead of a clash, and let the bgnlockup suffice for the clash. Just don’t hold unless you want actual lockup…?
You can have multiple button events trigger the same thing so you can still “trigger a full lockup effect as normal when holding the aux button during impact.”

1 Like

Yes, having the “Begin Lockup” effect happen instead of a regular clash is one of several possible workarounds I was considering.

I should clarify that I’m using the power button to trigger clashes. Aux button triggers blaster blocks when clicked, lightning blocks if held, and regular lockup if held during impact. So I’m able to get the full range of effects I want with a two-button setup. I’m just trying to make the non-impact clashes and lockups feel as responsive as I can.

I would change it so that EVENT_PRESS triggers a lockup.
A short lockup and a clash are very nearly the same thing.

That’s what I was saying, so press POW to “clash” using bgnlock, or press and hold to continue into lockup.
Impact clash and impact+hold AUX to lockup would still function as normal.

Okay, I tried triggering the lockup via EVENT_PRESSED, and while it works, it’s not quite perfect with any of the fonts I’m using. Either the endlock effect sounds too much like a second clash, or the lock.wav itself plays a little too long. It’s extremely close to what I’m looking for, though. Thanks for the tip.

I’ll try sacrificing the lightning block effect (which I don’t expect to really ever use) and holding Aux to trigger a regular lockup instead. Not as responsive as I’d like, since there’s a 300 ms wait for EVENT_HELD to trigger, but it may be the best I can do for now.

1 Like

Ah, yeah, I didn’t think that one through. endlock will always follow. You could probably make a bool in your prop that only gets set when you do your custom event, and then use it to bypass SaberBase::DoEndLockup() in the button release section.

Something like (untested)

    case EVENTID(BUTTON_POWER, EVENT_PRESSED, MODE_ON):
        fakeLockup_ = true;
        SaberBase::DoBeginLockup();
        return true;
    case EVENTID(BUTTON_POWER, EVENT_RELEASED, MODE_ANY_BUTTON | MODE_ON):
      if (SaberBase::Lockup()) {
        if (!fakeLockup_) SaberBase::DoEndLockup();
        fakeLockup_ = false;
        SaberBase::SetLockup(SaberBase::LOCKUP_NONE);
        return true;
      }


bool fakeLockup_ =  false;

I think it’s weird if endlock sounds like another clash.
Not sure if the skip thing that NoSloppy suggests will work perfectly.
If not, maybe just try a different font? (Or just delete the endlockup sounds?)

Through experimentation, I discovered that triggering a clash at the same time as the lockup resolves the problem, apparently:

SaberBase::DoClash();
SaberBase::SetLockup(SaberBase::LOCKUP_NORMAL);
SaberBase::DoBeginLockup();

I think it’s playing a regular clash overtop the begin and end lockup sounds, and this smooths everything out. You get a little hint of the lockup sound in the aftermath, but I actually like it that way. Sounds right to me.

This should work fairly well, but it depends on the font obviously.
If the font has weird bgnlock sounds, this could sounds terrible.

Yeah, maybe not as universal as I’d like it to be, but I tried it with four different Kyberphonic fonts and liked the results on all of them.