What's new

KSP: Most efficient way of programming user selectable FX?

thesteelydane

Bunker Samples
Hello KSP wizards....still a newbie scripted, but getting better every day. I'm at the beginning of a new project that requires user selectable FX - which is easy enough to do with a menu. What I'm wondering is best practice for the controls for said FX.

A: Is it better to declare a ui control for each parameter pr FX, and then only show the ones being used. You could quickly end up with hundreds of hidden buttons and sliders, but the coding would be quite straight forward.

or.....

B: Is it better to have just a few ui controls and change their assignment depending on what FX the user selects? Seems more efficient, but the coding more complex.

How is this usually accomplished?
 
It partly depends on whether the hidden FX are still heard, or whether you only hear the displayed FX. If you can choose to edit many effects, and hear all of them at once even though you only choose to edit one at a time, then it's better to go with "A" because of automation. If knobs change their assignment automation can be really frustrating. If you only hear the currently editable FX then this doesn't really matter.
 
It partly depends on whether the hidden FX are still heard, or whether you only hear the displayed FX. If you can choose to edit many effects, and hear all of them at once even though you only choose to edit one at a time, then it's better to go with "A" because of automation. If knobs change their assignment automation can be really frustrating. If you only hear the currently editable FX then this doesn't really matter.

In this case the user essentially selects an FX for a given “slot”. Changing the FX replaces whatever FX was previously residing in that slot. So I guess I’m going with B...
 
Top Bottom