(G15 Keyboard)Regarding Mods And Their Requirements.
DY357LX
Playing since day 1. Still can't Comm.England Join Date: 2002-10-27 Member: 1651Members, Constellation
in Modding
<div class="IPBDescription">LUA version of #include for G15 etc?</div>I own a G15 keyboard, and whilst it's a great keyboard I find that quite a few of my fave games don't support it.
We all know that NS2 uses LUA heavily for various things. But today I noticed that Logitech (makers of the keyboard)
now support LUA for the G15 keyboard. (I don't know if the G19 etc is supported.)
(Article can be found here: <a href="http://newsletter2.logitech.com/logitech/general/2008/gaming/winter/us_en/tips.html" target="_blank">http://newsletter2.logitech.com/logitech/g...us_en/tips.html</a>)
My programming experience is limited, I has basic knowledge of C++ and PHP but that's about it.
If I wanted to go about reading things like remaining Health, Ammo etc from NS2, could I place my own .lua file inside
NS2's main folder and have my .lua file interact with functions from NS2's official files. Or would I have to use the Builder
application to make an entirely separate Mod and then have it interact with the required files?
If yes, what's the correct way to do this?
In C++ it'd be something like:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#include <Player.lua>
#include <Rifle.lua><!--c2--></div><!--ec2-->
And so on... is there a LUA equivalent?
My apologies if my terminology is off and my question is dumb, I just really want NS2 to work with my G15. Even if I have to do it myself :-P
Thanks.
We all know that NS2 uses LUA heavily for various things. But today I noticed that Logitech (makers of the keyboard)
now support LUA for the G15 keyboard. (I don't know if the G19 etc is supported.)
(Article can be found here: <a href="http://newsletter2.logitech.com/logitech/general/2008/gaming/winter/us_en/tips.html" target="_blank">http://newsletter2.logitech.com/logitech/g...us_en/tips.html</a>)
My programming experience is limited, I has basic knowledge of C++ and PHP but that's about it.
If I wanted to go about reading things like remaining Health, Ammo etc from NS2, could I place my own .lua file inside
NS2's main folder and have my .lua file interact with functions from NS2's official files. Or would I have to use the Builder
application to make an entirely separate Mod and then have it interact with the required files?
If yes, what's the correct way to do this?
In C++ it'd be something like:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#include <Player.lua>
#include <Rifle.lua><!--c2--></div><!--ec2-->
And so on... is there a LUA equivalent?
My apologies if my terminology is off and my question is dumb, I just really want NS2 to work with my G15. Even if I have to do it myself :-P
Thanks.
Comments
Script.Load("lua/Weapons/Weapon.lua")
Wrote a quick file to test outputting to the LCD but am not sure which default NS2 lua file to edit and tell the Script.Load function to load my file.
Any ideas?
If so, I think it should be possible. The Player_Client.lua got this code.
function PlayerUI_GetPlayerHealth()
return Client.GetLocalPlayer():GetHealth()
end
function PlayerUI_GetPlayerMaxHealth()
return Client.GetLocalPlayer():GetMaxHealth()
end
So I guess you just have to either copy the code that is inside the functions, or just Script.Load player_client and use those functions.
Thanks