by JamesLit » Sat Dec 18, 2021 11:35 pm
Hi Steve,
Actually not too sure on that one.
Personally I would have the 'fallback' option (as in the last thing) to be to disable all headboards rather than to show one of them.
You would also benefit from having a call to disable all headboard nodes in the Initialise function.
I'm not sure whether Update would be the better function for the showing/hiding to be in... worth a try though. Unfortunately I'm away from home so can't try it out myself for you.
I note your control has 3 notches but the maximum value for the control itself is 1, so that won't help matters - it's easiest to use the same numbers here, so if you have the two headboards for now, keep 3 notches but have the maximum value as 2 rather than 1, so that you have 0-2 to work with. Therefore you have 1 whole number per option (none, 1 or 2).
Also, you have the control set up as a push button, which may not be ideal for this sort of thing - try it as a lever of some sort. Push buttons tend to be a 0 or 1 affair without notches, e.g. for stuff like extra whistles for example. I'm not sure whether the movement sensitivity may be a bit high to allow smooth changes between options without skipping through them too fast? But when they work I suppose you will find out!
The last thing I can think to check is the input mapper - just do your basic checks to ensure you've not made any errors and you do actually have it set up as you intend: I'm not sure whether you wanted to do it along the lines of headlights where you start at the lowest value and then have a button to cycle back from high to low values when you reach the end, or have it setup as a loop, which would involve an extra line of scripting in the LUA and a couple of small changes but would be very easy. Cycling high to low will want 4 entries in the input mapper as you have 2 key presses and releases to worry about, rather than just 1 press and release for a looping system.
I know it sounds silly telling you to 'check your work' but to be honest I am speaking from experience - I often find myself scratching my head saying "I've done this completely right but it doesn't work!" only to find I missed one tiny thing...! TS as we all know is a fickle and harsh mistress.....