_pKeys.lua module [LUA Modders Resource] 1.0
860
13
860
13
Short version:
adds 4 functions for better key control
GetKeyJustPressed(key)
GetKeyJustReleased(key)
GetKeyPressed(key)
GetKeyReleased(key)
the module requires current version of LUA Plugin for Script Hook V which includes the "keys.lua" that it also requires in order to work, and it needs to be put into "scripts\addins" or "scripts\libs" folder
Long version:
Well, im taking the chance here, maybe im wrong again and the functions are already somewhere, but i havent seen them anywhere.
We all know the "get_key_pressed(key)" function, its a solid function, but alone its useless, combined with "while get_key_pressed(key) do wait(0) end" it can act as a function that triggers on key release, however with "wait(0)" it freezes all LUA scripts, and without it, it freezes the whole damn game. There is no other way to intercept the exact moment of key being pressed or released than making our own functions, and if every single LUA scripter does that with their own functions, then it will use more resources than it really needs.
Rambling section:
And that got us where we are now, if these functions really dont exist then its all good, if they do then 2 weeks from now, some dude shows up and he will point out a website nobody ever heard of that contains all the functions and ill feel once again like a moron who jumped under a train trying to do something good and instead got his legs removed, not literally, but you know, psychical pain is real too!
You can modify and reupload this mod without my permission, however that will possibly defeat the purpose of it being here, which is to not waste resources.
adds 4 functions for better key control
GetKeyJustPressed(key)
GetKeyJustReleased(key)
GetKeyPressed(key)
GetKeyReleased(key)
the module requires current version of LUA Plugin for Script Hook V which includes the "keys.lua" that it also requires in order to work, and it needs to be put into "scripts\addins" or "scripts\libs" folder
Long version:
Well, im taking the chance here, maybe im wrong again and the functions are already somewhere, but i havent seen them anywhere.
We all know the "get_key_pressed(key)" function, its a solid function, but alone its useless, combined with "while get_key_pressed(key) do wait(0) end" it can act as a function that triggers on key release, however with "wait(0)" it freezes all LUA scripts, and without it, it freezes the whole damn game. There is no other way to intercept the exact moment of key being pressed or released than making our own functions, and if every single LUA scripter does that with their own functions, then it will use more resources than it really needs.
Rambling section:
And that got us where we are now, if these functions really dont exist then its all good, if they do then 2 weeks from now, some dude shows up and he will point out a website nobody ever heard of that contains all the functions and ill feel once again like a moron who jumped under a train trying to do something good and instead got his legs removed, not literally, but you know, psychical pain is real too!
You can modify and reupload this mod without my permission, however that will possibly defeat the purpose of it being here, which is to not waste resources.
Först uppladdad: 13 juni 2015
Senast uppdaterad: 13 juni 2015
Senast nedladdad: 2 dagar sen
5 Kommentarer
More mods by XKillER:
Short version:
adds 4 functions for better key control
GetKeyJustPressed(key)
GetKeyJustReleased(key)
GetKeyPressed(key)
GetKeyReleased(key)
the module requires current version of LUA Plugin for Script Hook V which includes the "keys.lua" that it also requires in order to work, and it needs to be put into "scripts\addins" or "scripts\libs" folder
Long version:
Well, im taking the chance here, maybe im wrong again and the functions are already somewhere, but i havent seen them anywhere.
We all know the "get_key_pressed(key)" function, its a solid function, but alone its useless, combined with "while get_key_pressed(key) do wait(0) end" it can act as a function that triggers on key release, however with "wait(0)" it freezes all LUA scripts, and without it, it freezes the whole damn game. There is no other way to intercept the exact moment of key being pressed or released than making our own functions, and if every single LUA scripter does that with their own functions, then it will use more resources than it really needs.
Rambling section:
And that got us where we are now, if these functions really dont exist then its all good, if they do then 2 weeks from now, some dude shows up and he will point out a website nobody ever heard of that contains all the functions and ill feel once again like a moron who jumped under a train trying to do something good and instead got his legs removed, not literally, but you know, psychical pain is real too!
You can modify and reupload this mod without my permission, however that will possibly defeat the purpose of it being here, which is to not waste resources.
adds 4 functions for better key control
GetKeyJustPressed(key)
GetKeyJustReleased(key)
GetKeyPressed(key)
GetKeyReleased(key)
the module requires current version of LUA Plugin for Script Hook V which includes the "keys.lua" that it also requires in order to work, and it needs to be put into "scripts\addins" or "scripts\libs" folder
Long version:
Well, im taking the chance here, maybe im wrong again and the functions are already somewhere, but i havent seen them anywhere.
We all know the "get_key_pressed(key)" function, its a solid function, but alone its useless, combined with "while get_key_pressed(key) do wait(0) end" it can act as a function that triggers on key release, however with "wait(0)" it freezes all LUA scripts, and without it, it freezes the whole damn game. There is no other way to intercept the exact moment of key being pressed or released than making our own functions, and if every single LUA scripter does that with their own functions, then it will use more resources than it really needs.
Rambling section:
And that got us where we are now, if these functions really dont exist then its all good, if they do then 2 weeks from now, some dude shows up and he will point out a website nobody ever heard of that contains all the functions and ill feel once again like a moron who jumped under a train trying to do something good and instead got his legs removed, not literally, but you know, psychical pain is real too!
You can modify and reupload this mod without my permission, however that will possibly defeat the purpose of it being here, which is to not waste resources.
Först uppladdad: 13 juni 2015
Senast uppdaterad: 13 juni 2015
Senast nedladdad: 2 dagar sen
Can this be "adapted" to be placed inside "scripts\libs\" folder ?
theres nothing to adapt, it works there too
but i didnt even know that until now, fkn hell.. im like mentally blind or somethin
Oh, ok. I didn't even bothered to try... good to know it works. I hope this gets implemented in the plugin itself asap. Really useful stuff.
great stuff! Very useful.
Really useful! thxxxx