In order to get input from a local player you will need to access it's ModInputPlayer.cs which can be located in the ModPlayerControllerInputManager.cs
Here is an example how to get the ModInputPlayer.cs.
Note: This example assumes you've made your own custom player controller, if you haven't please look at Custom Player Controller Example
Note: Before you access anything you must make sure ModReady has been called
Here is a list of the axis/buttons you can use
Default
Action Name | Type | Description |
---|---|---|
Vertical | Axis | Player Movement forwards/backwards |
Horizontal | Axis | Player Movement left/right |
LeftArmGrab | Button | Grabbing using left hand |
RightArmGrab | Button | Grabbing using right hand |
LookDeltaX | Axis | Moving camera (left/right) |
LookDeltaY | Axis | Moving camera (up/down) |
Jump | Button | Jump |
Ragdoll | Button | Ragdoll |
ActionEnterExitInteract | Button | Interacting with anything "Press F TO interact" |
ActionPauseMenu | Button | Show pause menu |
LocalPlayerJoin | Button | Joining splitscreen player |
Map | Button | Opening map |
MapZoom | Axis | Zooming in and out of map |
FovZoom | Axis | Zooming in and out of player |
Character_Special_01 | Button | Used for clothing abilities 1 |
Character_Special_02 | Button | Used for clothing abilities 2 |
EmoteWheel | Button | Show emote wheel |
TodoList | Button | Toggles todo list |
SpectatePrevious | Button | Previous spectator |
SpectateNext | Button | Next spectator |
Vehicle
Action Name | Type | Description |
---|---|---|
Acceleration | Axis | Forward/Back |
SteerAxis | Axis | Steer Left/Right |
Horn | Button | Horn |
VehicleFire | Button | Used for shooting |
Acceleration_Alt | Axis | An alternative acceleration |
Handbrake | Button | Handbrake |
Vehicle_Special_1 | Button | Special button for vehicle |
Vehicle_Special_2 | Button | Special button for vehicle |
Vehicle_Special_3 | Button | Special button for vehicle |
VehicleHeight | Axis | Changing height in helicopter/ufo |
UI
Action Name | Type | Description |
---|---|---|
UIHorizontal | Axis | Going left/right in a menu |
UIVertical | Axis | Going up/down in a menu |
UISubmit | Button | Pressing a button in a menu |
UICancel | Button | Exiting out of a menu |
UILB | Button | LB |
UIRB | Button | RB |
UIWaypoint | Button | Toggling waypoint |
UIToDoListMissionActiveToggle | Button | Toggling todo list (Whether a mission is active) |
UIRightHorizontal | Axis | Used for scroll bars (left/right) |
UIRightVertical | Axis | Used for scroll bars (up/down) |