Jump to content

Linking Custom Congif variable from modmain.lua to Custom Custom.lua


Recommended Posts

Trying to take this...

local RELICKEY = GetModConfigData("RELICKEY")--Relic Toggle Key

and link it to this in my custom character.lua

local 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    endend

The keybinding works with key_"whatever", but I want to give players the Config power.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...