HomShaBom Posted November 30, 2016 Share Posted November 30, 2016 (edited) I want to add a haunting effect to "smallmeat" so in my modmain.lua I have: AddPrefabPostInit("smallmeat", function(inst) --here I want to call AddMonsterMeatChange(inst, "someotherprefab") that exists in \data\scripts\prefabs\meats.lua end) Is this possible, or will I have to just duplicate this method inside of my modmain.lua? --EDIT-- I meant to post this in DST forum, not DS Edited November 30, 2016 by HomShaBom Link to comment https://forums.kleientertainment.com/forums/topic/72144-can-i-call-a-function-that-exists-in-prefab-file-from-modmainlua/ Share on other sites More sharing options...
Mobbstar Posted November 30, 2016 Share Posted November 30, 2016 It's a "local function", so you can't access it from your modmain. You can copy and paste the code, though. Link to comment https://forums.kleientertainment.com/forums/topic/72144-can-i-call-a-function-that-exists-in-prefab-file-from-modmainlua/#findComment-843307 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