Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Turn Alt blade on/off using Aux button
- // Works on 2 button sabers even if running 1 button controls
- case EVENTID(BUTTON_AUX, EVENT_FIRST_HELD, MODE_ON):
- hybrid_font.DoEffect(EFFECT_USER4, 0);
- return true;
- //Down where SB_Effect has the other effect's sounds trigger, this gets added:
- case EFFECT_USER4: // Alt blade
- if (!second_blade_on_) {
- hybrid_font.PlayCommon(&SFX_out);
- second_blade_on_ = true;
- } else {
- hybrid_font.PlayCommon(&SFX_in);
- second_blade_on_ = false;
- }
- // second_blade_on_ variable needs to be initialized as false (with the other bools in the prop)
- // It also needs to become false anywhere there's a call to Off() to keep the toggle in sync if Aux is not the event to trigger retraction.
- //Then the blade style is like this:
- StylePtr<Layers<
- Black,
- AlphaL<
- // This Red can be replaced by a Layers<> with your existing style stuff in it, from the base blade down to, but not including, the InOutTrL.
- Red,
- IsGreaterThan<EffectIncrementF<EFFECT_USER4,Int<32768>,Int<16384>>,Int<100>>>,
- EffectSequence<EFFECT_USER4,TransitionEffectL<TrConcat<TrInstant,Black,TrWipe<500>>,EFFECT_USER4>,TransitionEffectL<TrConcat<TrInstant,
- // This Red should be the same as the base blade color layer
- Red,
- TrWipeInX<Int<500>>>,EFFECT_USER4>>,
- InOutTrL<TrInstant,TrWipeInX<WavLen<EFFECT_RETRACTION>>>
- >>(),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement