Advertisement
gocha

Example use of joypad get/set I wanted to do

May 4th, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.23 KB | None | 0 0
  1. -- Use of joypad get/set
  2.  
  3. event.onframestart(function()
  4.   local t = joypad.get()
  5.   if t["P1 A"] and t["P1 B"] then
  6.     t["P1 A"] = false
  7.     t["P1 B"] = false
  8.     print("somethingspecial = true")
  9.   end
  10.   joypad.set(t)
  11. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement