JadeKnightblazer Posted February 23, 2015 Share Posted February 23, 2015 Trying to take this...local RELICKEY = GetModConfigData("RELICKEY")--Relic Toggle Keyand link it to this in my custom character.lualocal function OnRelicKeyPressed(inst, data) if data.inst == ThePlayer then if data.key == "This is where the Config key goes" then if TheWorld.ismastersim then BufferedAction(inst, inst, ACTIONS.SKUSERELIC):Do() -- Since we are the server, do the action on the server. else SendRPCToServer(RPC.DoWidgetButtonAction, ACTIONS.SKUSERELIC.code, inst, ACTIONS.SKUSERELIC.mod_name) end end endendThe keybinding works with key_"whatever", but I want to give players the Config power. Link to comment Share on other sites More sharing options...
Kzisor Posted February 23, 2015 Share Posted February 23, 2015 @JadeKnightblazer, you need to make your RELICKEY variable into a global variable. GLOBAL.RELICKEY = GetModConfigData("RELICKEY") Now inside your custom character prefab you will be able to simply use RELICKEY. Link to comment Share on other sites More sharing options...
JadeKnightblazer Posted February 23, 2015 Author Share Posted February 23, 2015 Thank you very much! Link to comment Share on other sites More sharing options...
SenL Posted March 1, 2015 Share Posted March 1, 2015 Hot dang, it works! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now