oni0n
|
  |
| Joined: 04 Nov 2012 |
| Total Posts: 2975 |
|
|
| 11 Sep 2015 06:19 AM |
.. If I'm double-tapping a key?
Also, if you want to tell me that MouseEvents are depreciated, piss off.
cout << "Proof by analogy is fraud." << endl; //Bjarne Stroustrup |
|
|
| Report Abuse |
|
|
oni0n
|
  |
| Joined: 04 Nov 2012 |
| Total Posts: 2975 |
|
|
| 11 Sep 2015 06:39 AM |
Bump
cout << "Proof by analogy is fraud." << endl; //Bjarne Stroustrup |
|
|
| Report Abuse |
|
|
oni0n
|
  |
| Joined: 04 Nov 2012 |
| Total Posts: 2975 |
|
|
| 11 Sep 2015 07:09 AM |
Bump 2
cout << "Proof by analogy is fraud." << endl; //Bjarne Stroustrup |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 11 Sep 2015 07:13 AM |
Try detecting when user presses/clicks the key and wait if they do it quick enough so it counts as double click.
~davisky~ |
|
|
| Report Abuse |
|
|
oni0n
|
  |
| Joined: 04 Nov 2012 |
| Total Posts: 2975 |
|
| |
|
oni0n
|
  |
| Joined: 04 Nov 2012 |
| Total Posts: 2975 |
|
|
| 11 Sep 2015 08:09 AM |
BUMP GOSH DARNIT
cout << "Proof by analogy is fraud." << endl; //Bjarne Stroustrup |
|
|
| Report Abuse |
|
|
Fribet
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 700 |
|
|
| 11 Sep 2015 08:10 AM |
| Try detecting when user presses/clicks the key and wait if they do it quick enough so it counts as double click.[2] |
|
|
| Report Abuse |
|
|
|
| 11 Sep 2015 09:10 AM |
Mouse Keypressed connect function(key) if key == var name then Mouse . keypressed connect function(double key) if double key == var name then blah blah blah |
|
|
| Report Abuse |
|
|
oni0n
|
  |
| Joined: 04 Nov 2012 |
| Total Posts: 2975 |
|
|
| 11 Sep 2015 10:11 AM |
Thank you, someone who can give me a practical example.
cout << "Proof by analogy is fraud." << endl; //Bjarne Stroustrup |
|
|
| Report Abuse |
|
|
IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
|
| 11 Sep 2015 11:01 AM |
| Try detecting when user presses/clicks the key and wait if they do it quick enough so it counts as double click.[3] |
|
|
| Report Abuse |
|
|
|
| 11 Sep 2015 11:03 AM |
Try detecting when user presses/clicks the key and wait if they do it quick enough so it counts as double click.[4]
stupid kid thinks were slaves, get the hell out |
|
|
| Report Abuse |
|
|
xlaser23
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
|
| 11 Sep 2015 11:08 AM |
rofl
http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$668 Tx1,986 |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 11 Sep 2015 11:51 AM |
UIS u peasant
local uis = game:GetService("UserInputService") local threshold = .5 -- how much time the client has to double tap a key for it to be registered as a double tap
local function listenForDoubleTapInput(KeyCode) local connection connection = uis.InputBegan:connect(function(input, gpe) if not gpe and input.KeyCode == KeyCode then local timer = tick() local inputt, gpe = uis.InputBegan:wait() if inputt.KeyCode == KeyCode and not gpe then local elapsedTime = timer - tick() if elapsedTime <= threshold then connection:disconnect() print(game.Players.LocalPlayer.Name.." doubled tapped the "..inputt.KeyCode.Name.." key!") return inputt.KeyCode, elapsedTime end end end end end
-- when you want to listen for a double tap local keyCode, elapsedTime = listenForDoubleTapInput(Enum.KeyCode.Space) print(keyCode, elapsedTime)
do something similar to this (if it works, didn't test) |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 11 Sep 2015 11:52 AM |
| yeah, i forgot closing parentheses around the anonymous function |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 11 Sep 2015 11:55 AM |
*local elapsedTime = tick() - timer
|
|
|
| Report Abuse |
|
|