Skip to content

OBSE Gamepad Events #5

Description

@cmd430

If you ever come back to this it would be great if we could get some custom OBSE events for gamepad button presses, connect/disconnect etc so we can write more efficient scripts.

example of what i would like to be able to do

scn FnOnGamepadButton

int buttonindex

begin Function { buttonindex }
	if ( buttonindex == 14 )
		print "You pressed the X button"
	endif
end

---------------

scn FnOnGamepadStatus

short gamepadstatus

begin Function { gamepadstatus }
	if ( gamepadstatus == 1 )
		print "Gamepad was Connected"
	else
		print "Gamepad was Disconnected"
	endif
end

---------------

scn SomeQuestScript

begin gamemode
	if ( getGameRestarted )
		SetGamepadEventHandler "OnGamepadButton" FnOnGamepadButton
		SetGamepadEventHandler "OnGamepadStatus" FnOnGamepadStatus
	endif
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions