cashya Posted July 23, 2020 Share Posted July 23, 2020 Can I create a new mod then apply it by changing the prefab settings being used in another mod? sample code is working? coffee prefab in Tropical Experience local function OnEaten(inst, eater) eater.components.locomotor.isrunning = true eater.components.locomotor.groundspeedmultiplier = 1.2 eater.components.locomotor.externalspeedmultiplier = 1.2 eater:DoTaskInTime(120, turnoffspeed) end local function coffeePostInit(inst) inst.components.edible:SetOnEatenFn(OnEaten) end AddPrefabPostInit("coffee",coffeePostInit) Link to comment https://forums.kleientertainment.com/forums/topic/120357-it-is-possible-addprefabpostinit-help/ Share on other sites More sharing options...
-LukaS- Posted July 24, 2020 Share Posted July 24, 2020 You can check if a mod is enabled by adding this: if GLOBAL.KnownModIndex:IsModEnabled("workshop-'mod ID'") then -- YOUR CODE end Mod ID can be found on the mod page in the workshop. In the URL there will be ?id= with the id number. 1 Link to comment https://forums.kleientertainment.com/forums/topic/120357-it-is-possible-addprefabpostinit-help/#findComment-1357160 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