# Blade style to control blade length

**URL:** <https://crucible.hubbe.net/t/blade-style-to-control-blade-length/6131>\
**Category:** Blade Styles\
**Created:** [November 27, 2024, 9:46pm UTC](https://crucible.hubbe.net/t/blade-style-to-control-blade-length/6131 "2024-11-27T21:46:23Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![NoSloppy](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/nosloppy/32/3865_2.png) [@NoSloppy](https://crucible.hubbe.net/u/NoSloppy)\
**Post date:** [November 29, 2024, 10:43am UTC](https://crucible.hubbe.net/t/blade-style-to-control-blade-length/6131/15 "2024-11-29T10:43:23Z")

</div>

pssst. Do Blade ID switching with just a button press.

> [@Playing unique blade array audio idents on live array switching](https://crucible.hubbe.net/t/playing-unique-blade-array-audio-idents-on-live-array-switching/6120/20):
>
> The idea is just to cycle → next array → next array yes? Then plays the appropriate arrayN.wav once switched? Well I got something working, even though despite many attempts to have it work in conjunction with BLADE\_ID\_SCAN\_MILLIS active, it seems that’s just not going to happen. If the scan result is different than a manually set blade array, it either just takes over or freezes the board grimacing That said, I got it to work. disable BLADE\_ID\_SCAN\_MILLIS add EFFECT(array) to the prop I ended up making a “FakeFindBladeAgain” that does what normally happens minus the part about getting the best\_config. It just uses the manually set current\_config. This method totally disregards the resistance argument in the blade arrays. It just strictly cycles through them sequentially. Here’s what I got: void NextBladeArray() { current\_config = blades + (current\_config - blades + 1) % NELEM(blades); FakeFindBladeAgain(); SFX\_array.Select(current\_config - blades); hybrid\_font.PlayCommon(&SFX\_array); } // Manual Blade Array Selection version of FindBladeAgain() void FakeFindBladeAgain() { // Do everything FindBladeAgain() and FindBlade() do, except for recalculating best\_config ONCEPERBLADE(UNSET\_BLADE\_STYLE) #undef DEACTIVATE #define DEACTIVATE(N) do { \ if (current\_config-\>blade##N) \ current\_config-\>blade##N-\>Deactivate(); \ } while(0); ONCEPERBLADE(DEACTIVATE); SaveVolumeIfNeeded(); #undef ACTIVATE #define ACTIVATE(N) do { \ if (!current\_config-\>blade##N) { \ goto bad\_blade; \ } \ current\_config-\>blade##N-\>Activate(N); \ } while(0); ONCEPERBLADE(ACTIVATE); RestoreGlobalState(); #ifdef SAVE\_PRESET ResumePreset(); #else SetPreset(0, false); #endif // SAVE\_PRESET return; #if NUM\_BLADES != 0 bad\_blade: ProffieOSErrors::error\_in\_blade\_array(); #endif } Then you just call NextBladeArray() with your button event. I didn’t bother with a reverse direction. Are there really going to be so many that just cycling through forwards isn’t good enough? Maybe, but I already spent too much overnight playing with this slight_smile Anyway, that was fun.

---

_[View the full topic](https://crucible.hubbe.net/t/blade-style-to-control-blade-length/6131)._
