icantevenname Posted March 31, 2019 Share Posted March 31, 2019 Is it possible to get a character mod to recognize if you're in the normal world, Shipwrecked world, or Hamlet and do a thing? Link to comment https://forums.kleientertainment.com/forums/topic/104415-detect-world/ Share on other sites More sharing options...
Ultroman Posted March 31, 2019 Share Posted March 31, 2019 I think these should do it local _G = GLOBAL local IsRoG = _G.IsDLCEnabled(_G.REIGN_OF_GIANTS) local IsSW = _G.IsDLCEnabled(_G.CAPY_DLC) local IsHamlet = _G.IsDLCEnabled(_G.PORKLAND_DLC) Link to comment https://forums.kleientertainment.com/forums/topic/104415-detect-world/#findComment-1172451 Share on other sites More sharing options...
icantevenname Posted April 1, 2019 Author Share Posted April 1, 2019 3 hours ago, Ultroman said: I think these should do it local _G = GLOBAL local IsRoG = _G.IsDLCEnabled(_G.REIGN_OF_GIANTS) local IsSW = _G.IsDLCEnabled(_G.CAPY_DLC) local IsHamlet = _G.IsDLCEnabled(_G.PORKLAND_DLC) I'm not sure how to use this. I've tried to put it both in and out of the master but I can't figure it out. You know those brackets that show up on the sides? The bracket starts under the local. I've tried setting it up like this. local _G = GLOBAL local IsSW = _G.IsDLCEnabled(_G.CAPY_DLC) inst:DoTaskInTime(0, function(inst) inst.components.skinner:SetSkinMode("capy_skin", "zachary_pirate") end) Link to comment https://forums.kleientertainment.com/forums/topic/104415-detect-world/#findComment-1172544 Share on other sites More sharing options...
Ultroman Posted April 1, 2019 Share Posted April 1, 2019 I'm not sure what you're trying to do here. The line local IsSW = _G.IsDLCEnabled(_G.CAPY_DLC) simply results in IsSW having a value of either true or false. If it is Shipwrecked, then IsSW == true You just use this variable to do an if-statement check. Probably like this: local _G = GLOBAL local IsSW = _G.IsDLCEnabled(_G.CAPY_DLC) if IsSW then inst:DoTaskInTime(0, function(inst) inst.components.skinner:SetSkinMode("capy_skin", "zachary_pirate") end) end Link to comment https://forums.kleientertainment.com/forums/topic/104415-detect-world/#findComment-1172548 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