Fribet
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 700 |
|
|
| 06 Sep 2015 01:01 PM |
Heres what I have:
service = game:GetService("UserInputService")
service.InputBegan:connect(function(p) print(tostring(p.KeyCode):sub(14)) --Start at the 14th letter thing end)
Instead of having to find the input cant you use something to automatically return the input? |
|
|
| Report Abuse |
|
|
Fribet
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 700 |
|
| |
|
| |
|
Fribet
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 700 |
|
| |
|
Fribet
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 700 |
|
| |
|
Fribet
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 700 |
|
|
| 06 Sep 2015 01:38 PM |
| "lol" was the most helpful advice D; |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
| |
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 06 Sep 2015 01:43 PM |
"Instead of having to find the input cant you use something to automatically return the input?"
local UIS = game:GetService("UserInputService")
local function listenForInput() local input, gpe = UIS.InputBegan:wait() print(input, gpe) return input, gpe end
local newInput, gameProcessedEvent = listenForInput()
what is the point though?
|
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 06 Sep 2015 01:47 PM |
if it helps, you could get the time elapsed from when you began to listen for input, and when InputBegan fired:
local UIS = game:GetService("UserInputService")
local function listenForInput() local beginElapsedTimer = tick() local input, gpe = UIS.InputBegan:wait() local elaspedTime = (beginElapsedTimer - tick())
print(input, gpe, elapsedTime) return input, gpe, elapsedTime end
local newInput, gameProcessedEvent, elapsedTime = listenForInput()
|
|
|
| Report Abuse |
|
|