SP3 Useful controller scripts
-
wow thanks!
-
I need a script for a motor using the triggers (joyRY) and the a button. When the right trigger is pressed (<0.5 for me) the motor should spin, and if a is pressed with the right trigger, it should spin at twice the speed. At 0.5, the motor should be allowed to spin freely (if possible) and a should have no effect. Above 0.5 (left trigger) the motor should stop spinning completely for 2 seconds, then go into reverse at half the normal speed, again with a having no effect.
I hope this isn't too complicated
This is for a car with 'boost' that can brake and reverse using the same button.
-
@cphillips said:
slider("Zero",0) <--Slider has a default position of 0 instead of 0.5
.How do I make the keyboard keys start at default position of Zero
or can't I?
like what I want is to not be able go backwards with a motor but start at zero -
rightx-0.5
For keyboard right/left
-
Any chance a guide or tutorial will be made to explain how to use these codes? It doesn't seem like something you could just pick up and figure out in a few minutes. Oh, and what do you type in the box to duplicate the object connected to the joint, like in the preview video?
Oh, and to make thrusters/magnets controllable:
(0.5-righty)*100000
0.5-: not necessary, but allows reverse directions. 0.8- would make it go 80%forward, 0.5- makes it half and half, so neutral means no thrust, and 0.2- would make it go 20% forwards.
right: right or left, which joystick to use/ wasd or arrow keys.
y: x or y, left and right, or up and down.
*100000: a *, and the strength of the thruster/magnet.
-
Will the beta version have the copy function?
-
I just figured out how to make the copy function work. Its now called Emitters and it will be in next version.
-
do you know what controller scripts are used to make a keyboard key do an action
(like the spacebar, or letters other than WAS and D),
or for a slider to multiply an object like in the pre-release video?Also, do you know why the script
(lefty-0.5)*300+slider('hover')*150
won't work in a thruster controller box? without the '-0.5', it seems to work, but I can't get it to do what I'm trying to.
-
@unknownuser said:
do you know what controller scripts are used to make a keyboard key do an action
(like the spacebar, or letters other than WAS and D),
or for a slider to multiply an object like in the pre-release video?Also, do you know why the script
(lefty-0.5)*300+slider('hover')*150
won't work in a thruster controller box? without the '-0.5', it seems to work, but I can't get it to do what I'm trying to.
that worked fine for me though the controls were switched so I did this
-(lefty-0.5)*300+slider('hover')*150
-
how do you make a motor controled by the arrow keys and have reverse?
-
righty-0.5
righty-0.5
right: controlled by right joystick, or keyboard arrow keys. left would be left joystick, or WASD keys.
y: y= up and down. x=left and right.
-0.5: makes .5 of the speed going backwards, in other words, allows reverse. you could also put 0.5- before righty, if the motor is going in the wrong direction.
Oh, and Phy, thanks; but for me, only half the controls were reversed: I managed to fix it after though.
-
Thanks
-
@unknownuser said:
do you know what controller scripts are used to make a keyboard key do an action
(like the spacebar, or letters other than WAS and D),
or for a slider to multiply an object like in the pre-release video?Also, do you know why the script
(lefty-0.5)*300+slider('hover')*150
won't work in a thruster controller box? without the '-0.5', it seems to work, but I can't get it to do what I'm trying to.
Not yet. But I think I am going to add something like
key("space") or key("1")
Mulitply an object will be the new emitters.
Your script should work as far as I can tell.
Advertisement