@cphillips said:
Sliders were in SP1 and Pistons were added in SP2. Even though they are very much the same and could have been one joint I left them in to retain backward compatibility.
Your right that it would be useful to have such a joint.
In the meantime you could do a few other things. One would be use a regular slider and then a thruster on the body to move it along the slider.
Another that would allow the keyboard to work would be do something like in a piston controller.
> #Formatted for clarity.
>
> pos=getVar("pos");
> pos=pos+(key("up")*0.02);
> pos=pos+(key("down")*-0.02);
> setVar("pos",pos);
> pos;
>
The last line tells the controller to set to the value of pos.
A shorter less easy to read version of the above.
>
> pos=getVar("pos")+(key("up")*0.02)+(key("down")*-0.02);setVar("pos",pos);pos;
>
>
That is a very good code but i found a problem with the second version. I'm yet to try the first one. It ignores the min and max values when you run it