Show values on S88 mk 2

Martinsennels
Martinsennels Member Posts: 3 Newcomer
edited March 2022 in Scripting Workshop

Hey guys,

When I make an instrument with custom knobs(sliders) I cant get my S88 mk2 to display the parameter changes above the knobs (see pictures), but when I use standard knobs everything works fine .. I guess I'm forgetting something in the script, but I can't figure out what ..??

Peace :-)


Answers

  • EvilDragon
    EvilDragon Moderator Posts: 947 mod
    edited March 2022

    set_control_par(get_ui_id($knob), $CONTROL_PAR_LABEL, get_engine_par_disp(<get your parameter here>) & " write parameter unit here")

    This has to be in UI control callback AND persistence_changed callback.

  • Martinsennels
    Martinsennels Member Posts: 3 Newcomer
    edited March 2022

    Hi,

    Tried to type this in almost every place I could think of, but I keep getting errors "expression expected" ... I don't have a persistence_changed callback in my script (don't know what that is ...)

    This is what I wrote :

    set_control_par(get_ui_id($Attack), $CONTROL_PAR_LABEL, get_engine_par_disp($ENGINE_PAR_ATTACK,0,0,-1) & "ms")

  • EvilDragon
    EvilDragon Moderator Posts: 947 mod
    edited March 2022

    Apologies, that should be set_control_par_str() there.

    You just create that "on persistence_changed" callback if you don't have it, put it after "on init" callback ends.

    Also, please check the sticky thread on modulation in KSP, I suggest you to use find_mod() instead of direct modulator IDs.

  • Martinsennels
    Martinsennels Member Posts: 3 Newcomer

    It worked !!!


    Thanks :-) :-)

Back To Top