Common Organization of Controls Kit Fields
Control object have a variety of fields that you can directly access.
Control objects' structure is defined as following:
- Option to use in functions that require it by default. Default value is "default".
- Layout to use in cock.setDefault by default. Default value is "default".
- Table that contains all readings for maps at current frame.
- Table that contains all readings for maps at previous frame.
- Table that contains all used joysticks.
- Joystick name.
- Joystick number.
- Table that contains miscellaneous data.
- Object ID.
- Table that contains mouse-related settings.
- X-coordinate of mouse offset. Default is 0.
- Y-coordinate of mouse offset. Default is 0.
- Horizontal scaling factor. Default is 1.
- Vertical scaling factor. Default is 1.
Accessing object.current.* is a suggested way of getting current state of the input.
You can access real joystick names and number by accessing object.joysticks[ # ].name and object.joysticks[ # ].number respectively.
An ID can be read from object.etc.id field.
All mouse settings can be done vla functions (cock.setMouseOffset and cock.setMouseFactor) or directly throguh object.etc.mouse.* fields.