Unable to move or add pictures to UI slider
Hello all,
Please can you help with a KSP issue I am having. I have declared a ui_slider and I am unable to move it or add a photo to it on the script. No errors are coming up on the KSP Script when applying in Kontakt.
declare ui_slider $Rate_knob (0,100)
{ set_text ($Rate_knob,"Rate")}
make_persistent ($Rate_knob)
declare $Rate_knobID
$Rate_knobID := get_ui_id($Rate_knob)
%arpeggiator_control_IDs[$k] := $Rate_knobID
inc ($k)
set_control_par_str(get_ui_id($Rate_knobID),$CONTROL_PAR_PICTURE,"rate")
set_control_par(get_ui_id($Rate_knobID),$CONTROL_PAR_WIDTH,43)
set_control_par(get_ui_id($Rate_knobID),$CONTROL_PAR_HEIGHT,43)
{ set_control_par_str(get_ui_id($Rate_knobID),$CONTROL_PAR_TEXT,"rate")}
move_control_px($Rate_knob,105,279)
Comments
-
A small error for the image code, it should :
set_control_par_str(get_ui_id($Rate_knob),$CONTROL_PAR_PICTURE,"rate")
or
set_control_par_str($Rate_knobID,$CONTROL_PAR_PICTURE,"rate")
And it all depends on what you want to do but for a slider, it is recommended:
declare ui_slider $Rate_knob (0,1000000)
0 -
Thanks so much!
0 -
Is it working fine ?
0 -
Im now able to add graphics to the Rate_knob - however still unable to move it. KSP is saying there is an error if I use:
move_control_px($Rate_knobID,105,279)
So I've entered
move_control_px($Rate_knob,105,279)
0 -
Yes, your second solution should work better .
0 -
You can only use literal UI widget names with
move_control_px
, not UI IDs. For UI IDs you need to useset_control_par()
.0 -
Okay cool, that makes sense. I'm still unable to move the slider though- there is no error in the script. Could something else be stopping it? Im having this problem elsewhere too within the instrument
0
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 61 NI News
- 774 Tech Talks
- 4K Native Access
- 16.4K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.7K Kontakt
- 1.6K Reaktor
- 376 Battery 4
- 835 Guitar Rig & FX
- 425 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.7K Maschine
- 7.2K Traktor
- 7.2K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators