ScriptableControls

A - Hands are far apart (L/R is irrelevant.)



- Hands are far apart (L/R is irrelevant.) B - Hands are close together (L/R is irrelevant.)



- Hands are close together (L/R is irrelevant.) C - Context laser button is held



- Context laser button is held D - Delete button is held



- Delete button is held F - Fingers are closed around the controller (requires Valve Index controller)



- Fingers are closed around the controller (requires Valve Index controller) G - Grip is held



- Grip is held H - Something is being held (not yet tested thoroughly)



- Something is being held (not yet tested thoroughly) L - Currently holding the input to control your "leg" (works even if none is attached)



- Currently holding the input to control your "leg" (works even if none is attached) M - Hand is moving



- Hand is moving N - Same as M, except a higher velocity is required.



- Same as M, except a higher velocity is required. Q0 - Hand is moving mostly left. (X-)



- Hand is moving mostly left. (X-) Q1 - Hand is moving mostly right. (X+)



- Hand is moving mostly right. (X+) Q2 - Hand is moving mostly downward. (Y-)



- Hand is moving mostly downward. (Y-) Q3 - Hand is moving mostly upward. (Y+)



- Hand is moving mostly upward. (Y+) Q4 - Hand is moving mostly backward. (Z-, toward your back)



- Hand is moving mostly backward. (Z-, toward your back) Q5 - Hand is moving mostly forward. (Z+)



- Hand is moving mostly forward. (Z+) R - Teleport button is held.



- Teleport button is held. T - Trigger is held.



- Trigger is held. X0-2, Y0-2, Z0-2 - Hand is located in this section of a 2x2x2 grid centered in front of your head.

0 - Trigger when condition becomes false. (falling edge)



- Trigger when condition becomes false. (falling edge) 1 - Trigger when condition becomes true. (rising edge)



- Trigger when condition becomes true. (rising edge) 2 - Trigger repeatedly as long as condition is false. (use sparingly)



- Trigger repeatedly as long as condition is false. (use sparingly) 3 - Trigger repeatedly as long as condition is true. (use sparingly)

Examples

XCL1T - Same as "HAND TRIGGERED LEFT", except it won't work unless this mod is installed. (I guess it could be useful if you want to make it harder for other people to use your attachments. :P)



- Same as "HAND TRIGGERED LEFT", except it won't work unless this mod is installed. (I guess it could be useful if you want to make it harder for other people to use your attachments. :P) XC3T - Repeatedly triggers whenever one or both hands has the trigger held. (Think rapid-fire weapons.)



- Repeatedly triggers whenever one or both hands has the trigger held. (Think rapid-fire weapons.) XCB1Y2-F - Triggers when you raise both open hands into the air.



- Triggers when you raise both open hands into the air. XC1GN - Triggers when you move your hand at a high speed while holding the grip. (Could be used for, e.g. a punch sound effect.)



- Triggers when you move your hand at a high speed while holding the grip. (Could be used for, e.g. a punch sound effect.) XC0-DM - Triggers whenever you press either the delete button or the trigger. More specifically, it monitors for when neither are being pressed, and then triggers when that is no longer true—that is, when you begin pressing at least one. (This means it will not trigger again if you press one while the other is still being held.)



- Triggers whenever you press either the delete button or the trigger. More specifically, it monitors for when are being pressed, and then triggers when that is no longer true—that is, when you begin pressing at least one. (This means it will not trigger again if you press one while the other is still being held.) XCR3DT-M-T - This one should trigger when you hold the delete button and press the trigger on your right hand, while keeping it mostly still. The "-T" at the end means it will not trigger if you instead hold the trigger and press the delete button. Nor will it trigger if you already have both held on a moving hand, and then stop moving your hand—which it would if not for the "-T".



- This one should trigger when you hold the delete button and press the trigger on your right hand, while keeping it mostly still. The "-T" at the end means it will trigger if you instead hold the trigger and press the delete button. Nor will it trigger if you already have both held on a moving hand, and then stop moving your hand—which it would if not for the "-T". XCR2T - Constantly fires as long as you're not holding the trigger on your right hand. This can be useful as a substitute for "HAND TRIGGER LET GO RIGHT" when used as a trigger to change state. If you have something change state when you press the trigger, but then you release the trigger before the state change finishes, normally it will miss the second message and remain stuck in the "on" state. If you use XCR2T instead (or the analogous code for a different body tell) then the message will go out continuously, so it will receive the message as soon as it can. This is not wasteful, as the tell will only trigger once or twice before it changes to a state that doesn't use XC2RT, and thus won't send anything.

This one requires the most explanation, but you can do some pretty cool stuff with it. Essentially, it extends "WHEN TOLD BY BODY" to support a syntax for defining custom body tells by combining multiple conditions to check for.A side effect of installing this mod is that if your controllers have analog sticks, the teleport laser will not activate unless you do so by moving the stick upwards. This is to free up the other input (pressing trackpad or analog stick) for custom actions. (See 'R' below.) I'll likely add an option in the future to toggle this behavior.The following conditions are currently supported:To use ScriptableControls, all you need to do is attach or hold something containing a "WHEN TOLD BY BODY", whereuses the following syntax:is just a required prefix.specifies which hand the condition refers to (L=left, R=right, B=both at once.) It may be omitted, meaning either hand will work.determines when to trigger. It is a digit from 0 to 3:What follows is the aforementioned condition, which is made up of up to three sets of condition flags as listed at the beginning of this section separated by hyphens. The first set () must all be true in order for the condition to be true. If a second set () is given, that set must additionally all be false. And if a third set () is given, the trigger will only occur when at least one of those flags changes state. Note that if you use, you must use either 2 or 3 for, or else it won't trigger. (The "use sparingly" warning does not apply in this case.)Play around with this a bit; you might come up with some fun uses! Additional functionality is also planned.