Jump to content

Change displayname from sandbox


Hae

Recommended Posts

Hi! Can you help me with the code to change the Displayname of an item from the sand box? 

 

--WITH SANDBOX OPTIONS
require('NPCs/MainCreationMethods');
local NAME1;
 
local function setLocalSandboxVars()
    NAME1 = SandboxVars.PerpetualItems.Name1;
    if NAME1 == nil then
        NAME1 = "Epic Hatchet";
    end    
 
end
 
local function initItemNamePerpetual()
    setLocalSandboxVars();
end
 
local item1 = getItemDisplayName(BCGTools.KukriMachete);
item1:setItemDisplayName(BCGTools.KukriMachete);
 
Events.OnGameStart.Add(initItemNamePerpetual);
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
×
×
  • Create New...