Jump to content

Controller Inputs?


Goodguy

Recommended Posts

How does one map the buttons on a Controller through coding?

 

Would it be something like

A = {}

function A.Pressed(_keyPressed)
	if _keyPressed == DPadDown then
		--Code
	end
end
--Or
function A.Pressed(_keyPressed)
	if _keyPressed == "DPadDown" then
		--Code
	end
end
--Or is it a number?
Events.OnKeyPressed.Add(A.Pressed)

Edit-------

Looked at PZ/media/lua/shared/JoyPad/JoyPadSertup.lua

Edited by Goodguy
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...