FelixTheJudge Posted November 13, 2016 Share Posted November 13, 2016 I feel like I'm doing this the wrong way. Well I know I'm doing this the wrong way really. I've had success modifying prefabs postinit but no luck with components. function Please(inst) local Lighter = Class(function(self, inst) self.inst = inst --V2C: Recommended to explicitly add tag to prefab pristine state inst:AddTag("lighter") self.onlight = nil end) function Lighter:Light(target) if self.shadowlight == true then else if target.components.burnable ~= nil and not (target:HasTag("fueldepleted") or target:HasTag("INLIMBO")) then target.components.burnable:Ignite() end end end end AddComponentPostInit("lighter", Please) I'm trying to change the Light function from the component Lighter but I really have no idea the proper method of changing a components function. Link to comment https://forums.kleientertainment.com/forums/topic/71658-modifying-a-component-post-init/ 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